parse java.specification.version not java.version, so that it is robust

This commit is contained in:
Robert Muir 2015-03-20 14:48:37 -04:00 committed by David Pilato
parent d20c8861ca
commit 51da1fe2a1
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ public class LocaleChecker {
public static int JVM_PATCH_MINOR_VERSION = 0; public static int JVM_PATCH_MINOR_VERSION = 0;
static { static {
StringTokenizer st = new StringTokenizer(Constants.JAVA_VERSION, "."); StringTokenizer st = new StringTokenizer(Constants.JVM_SPEC_VERSION, ".");
JVM_MAJOR_VERSION = parseInt(st.nextToken()); JVM_MAJOR_VERSION = parseInt(st.nextToken());
if(st.hasMoreTokens()) { if(st.hasMoreTokens()) {
JVM_MINOR_VERSION = parseInt(st.nextToken()); JVM_MINOR_VERSION = parseInt(st.nextToken());