Skip to content

Commit

Permalink
Fixed version check if running on Java before 9
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveeclipse committed Jun 5, 2016
1 parent db8203c commit f3184df
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.util.jar.Manifest;

import edu.umd.cs.findbugs.FindBugs;
import edu.umd.cs.findbugs.JavaVersion;
import edu.umd.cs.findbugs.SystemProperties;
import edu.umd.cs.findbugs.classfile.CheckedAnalysisException;
import edu.umd.cs.findbugs.classfile.ClassDescriptor;
Expand Down Expand Up @@ -403,8 +404,8 @@ private LinkedList<WorkListItem> buildSystemCodebaseList() {
}

private static boolean isJava9orLater() {
String jvmSpec = System.getProperty("java.vm.specification.version", "8");
return Integer.parseInt(jvmSpec) >= 9;
JavaVersion javaVersion = JavaVersion.getRuntimeVersion();
return javaVersion.getMinor() >= 9;
}

/**
Expand Down

0 comments on commit f3184df

Please sign in to comment.