changeset 39314:779f1d11a746

8160457: VersionProps.versionNumbers() is broken Reviewed-by: redestad, mchung, iris
author simonis
date Wed, 29 Jun 2016 10:07:15 +0200
parents 0970a9a1de13
children 355b087366f0
files jdk/src/java.base/share/classes/java/lang/VersionProps.java.template
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template	Fri Jun 10 13:57:51 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template	Wed Jun 29 10:07:15 2016 +0200
@@ -74,7 +74,7 @@
         while (index > 0) {
             versionNumbers.add(
                     Integer.parseInt(VERSION_NUMBER, prevIndex, index, 10));
-            prevIndex = index;
+            prevIndex = index + 1; // Skip the period
             index = VERSION_NUMBER.indexOf('.', prevIndex);
         }
         versionNumbers.add(Integer.parseInt(VERSION_NUMBER,