RFR: 8160954: (spec) Runtime.Version regex and $PRE/$OPT issues

Iris Clark iris.clark at oracle.com
Fri Oct 21 03:34:49 UTC 2016


Please review changes to address the following closely related bugs:

    8160954: (spec) Runtime.Version regex and $PRE/$OPT issues

    8148822: (spec) Regex in Runtime.Version and JEP 223 should match

    8148877: (spec) Specify when and empty '+' is required in a version



Changes to the specification of the $VNUM and $OPT regexp:

For line 963, we remove the leading '^' and trailing '$'.  These characters
are not strictly required for the regex to be accurate.  They're not included
in the implementation.  The presence of the trailing '$' precludes direct
substitution of this regex into the definition of $VSTR at line 1032 (see
bug 8160954).

Also for line 963, we remove the outermost qualifier in the portion of the
regex describing elements after $MAJOR.  This qualifier is redundant and a
source of catastrophic backtracking as described in this message [0, item 1]
(see bug 8148822).  It's not in the present implementation.

For line 1050, we remove the '\' as it is unnecessary in a character class
[0, item 4] (see bug 8148822).

Changes to the spec for $PRE/$OPT:

For lines 1056-1057, we clearly specify when an empty '+' is required (see
bugs 8148877, 8160954).  This spec corresponds to the code for additional
constraints for the "empty '+'" beginning at new line 1150.

The required CCC is in progress.


[0] http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-January/038036.html
[1] http://download.java.net/java/jdk9/docs/api/java/lang/Runtime.Version.html

More information about the core-libs-dev mailing list