Skip to content

Commit

Permalink
Honor optional LICENSEE file
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Nov 27, 2016
1 parent c893bf2 commit 0e41e08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jpos/src/main/java/org/jpos/util/PGPHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ public static int checkLicense() {
}

static InputStream getLicenseeStream() throws FileNotFoundException {
File l = new File (Q2.LICENSEE);
return l.canRead() ? new FileInputStream(l) : Q2.class.getClassLoader().getResourceAsStream(Q2.LICENSEE);
String lf = System.getProperty("LICENSEE");
File l = new File (lf != null ? lf : Q2.LICENSEE);
return l.canRead() && l.length() < 8192 ? new FileInputStream(l) : Q2.class.getClassLoader().getResourceAsStream(Q2.LICENSEE);
}
public static String getLicensee() throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Expand Down

0 comments on commit 0e41e08

Please sign in to comment.