-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b167
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8179811 | 10 | Pavel Rappo | P2 | Resolved | Fixed | b07 |
1) Runtime.Version spec says regarding $VNUM format:
"The format is: ^[1-9][0-9]*(((\.0)*\.[1-9][0-9]*)*)*$"
There is "$" in the end of $VNUM. "$" is end of line template.
However, the following code will throw IllegalArgumentException:
Version.parse("1.1.1" + System.lineSeparator());
Seems this is the spec problem and the template should be updated to the same but without "$" in the end.
2) According to the current spec the template for the version string is
$VNUM(-$PRE)?(\+($BUILD)?(-$OPT)?)?
There is no words regarding the case when $PRE and $OPT is used without $BUILD or when "+" is used without $BUILD and $OPT.
However, the following code will throw IllegalArgumentException:
- Version.parse("1.1.1-ea+--abc");
- Version.parse("1.1.1-ea+");
Seems this is the spec problem and the spec need to be supplemented with exception cases.
"The format is: ^[1-9][0-9]*(((\.0)*\.[1-9][0-9]*)*)*$"
There is "$" in the end of $VNUM. "$" is end of line template.
However, the following code will throw IllegalArgumentException:
Version.parse("1.1.1" + System.lineSeparator());
Seems this is the spec problem and the template should be updated to the same but without "$" in the end.
2) According to the current spec the template for the version string is
$VNUM(-$PRE)?(\+($BUILD)?(-$OPT)?)?
There is no words regarding the case when $PRE and $OPT is used without $BUILD or when "+" is used without $BUILD and $OPT.
However, the following code will throw IllegalArgumentException:
- Version.parse("1.1.1-ea+--abc");
- Version.parse("1.1.1-ea+");
Seems this is the spec problem and the spec need to be supplemented with exception cases.
- backported by
-
JDK-8179811 (spec) Runtime.Version regex and $PRE/$OPT issues
-
- Resolved
-
- relates to
-
JDK-8148877 (spec) Specify when an empty '+' is required in a version string
-
- Resolved
-
-
JDK-8148822 (spec) Regex in Runtime.Version and JEP 223 should match
-
- Closed
-