8160457: VersionProps.versionNumbers() is broken
authorsimonis
Wed, 29 Jun 2016 10:07:15 +0200
changeset 39314 779f1d11a746
parent 39313 0970a9a1de13
child 39315 355b087366f0
8160457: VersionProps.versionNumbers() is broken Reviewed-by: redestad, mchung, iris
jdk/src/java.base/share/classes/java/lang/VersionProps.java.template
--- 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,