diff options
author | Sven Gothel <[email protected]> | 2014-01-14 19:11:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-01-14 19:11:16 +0100 |
commit | 2ce522b01cc5f85084d373cefbe21ae706238191 (patch) | |
tree | c12bcf67d2bb26ec96b22d763ab36bf754f570b0 /src/java/jogamp/common | |
parent | 6de214a403f4277dbfdff2e9cf974c964f1dcdbb (diff) |
Bug 944 - Platform doesn't parse early-access java-version string properly (JAVA_VERSION_UPDATE)
Fix JAVA_VERSION_UPDATE for early release versions.
Early access java versions are e.g. '1.7.0_60-ea'
where releases simply are named: '1.7.0_60'.
Diffstat (limited to 'src/java/jogamp/common')
-rw-r--r-- | src/java/jogamp/common/os/PlatformPropsImpl.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/java/jogamp/common/os/PlatformPropsImpl.java b/src/java/jogamp/common/os/PlatformPropsImpl.java index 2f51b13..66fb5f9 100644 --- a/src/java/jogamp/common/os/PlatformPropsImpl.java +++ b/src/java/jogamp/common/os/PlatformPropsImpl.java @@ -100,14 +100,13 @@ public abstract class PlatformPropsImpl { JAVA_VERSION_NUMBER = new VersionNumber(JAVA_VERSION); { final int usIdx = JAVA_VERSION.lastIndexOf("_"); - int jvmUpdate = 0; if( usIdx > 0 ) { final String buildS = Platform.JAVA_VERSION.substring(usIdx+1); - try { - jvmUpdate = Integer.valueOf(buildS); - } catch (NumberFormatException nfe) {} + final VersionNumber update = new VersionNumber(buildS); + JAVA_VERSION_UPDATE = update.getMajor(); + } else { + JAVA_VERSION_UPDATE = 0; } - JAVA_VERSION_UPDATE = jvmUpdate; } JAVA_VM_NAME = System.getProperty("java.vm.name"); JAVA_RUNTIME_NAME = getJavaRuntimeNameImpl(); |