RFR: 8160000: Runtime.version() cause startup regressions in 9+119
Iris Clark
iris.clark at oracle.com
Mon Jun 27 20:11:37 UTC 2016
Hi, Claes.
[ Sorry for the premature send, my keyboard started interpreting my shortcuts
in unexpected ways. ]
> http://cr.openjdk.java.net/~redestad/8160000/webrev.5/
Nice bugid.
Overall, this change looks good. I just have a few concerns.
Have you built this forcing alternative build numbers using the makefile
"--with-version-<...>" options? For JDK 9 builds, the default version number
is only "9". You should make sure that versions "9.0.X" and "9.0.0.X" for
arbitrary value of X work as expected.
Runtime.java: I wonder if unmodifiablelist() should be invoked at new line
1090 instead of 941? Depending on the caller to provide an unmodifiable list
without additional verification seems like a potential problem. If you move
the invocation, then you may want to consider reducing the arguments of
Version() at lines 1086-1089 to the single VersionProps.
I expect to address the following outstanding issues in the coming weeks. I
don't think that they will impact your changes, but I leave it for you to
judge:
8156711: Runtime.Version.version should be an int[] instead of a
List<Integer>
https://bugs.openjdk.java.net/browse/JDK-8156711
This is an implementation change that was suggested during review. The
thought was that using an int[] is more efficient for space and comparisons.
If you believe that there is benefit to adding this change to yours, feel free
to take on the bug. Otherwise, assuming that there is still benefit to making
this change, I'll take care of it after your changes are in a promotion.
8156907: Runtime.Version.{major(),security()} return value of 0 may be
ambiguous
https://bugs.openjdk.java.net/browse/JDK-8156907
After careful consideration, this issue will be resolved by changing the
parse() implementation to allow trialing zero elements (now in
VersionBuilder.parse()). As an example of the target behavior,
v = Runtime.Version.parse("9.0.0") will not throw an IAE and v.toString()
will return "9". Specification adjustments will be needed. Since
VersionBuilder does not change the parse() implementation, I believe that
there won't be any problems.
Thanks,
iris
More information about the build-dev
mailing list