Skip to content

Commit

Permalink
Merge pull request #168 from klaraward/patch-1
Browse files Browse the repository at this point in the history
Handle Java -ea versions
  • Loading branch information
mattnworb authored Jun 10, 2021
2 parents b96a163 + 6448bff commit 1d41202
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ private Collection<JarEntry> getClassesForCurrentJavaVersion(Iterable<JarEntry>

// We have to figure out what JVM version we're running on.
Integer currentJavaVersion;
String[] javaVersionElements = System.getProperty("java.version").split("\\.");
String[] javaVersionElements =
System.getProperty("java.version").replaceAll("\\-ea", "").split("\\.");
if (javaVersionElements[0].equals("1")) {
currentJavaVersion = Integer.parseInt(javaVersionElements[1]);
} else {
Expand Down

0 comments on commit 1d41202

Please sign in to comment.