RFR: 8144062: Move jdk.Version to java.lang.Runtime.Version

Mandy Chung mandy.chung at oracle.com
Wed May 18 17:40:27 UTC 2016


> On May 13, 2016, at 4:20 PM, Iris Clark <iris.clark at oracle.com> wrote:
> 
> Hi.
> 
> Reviving this work from a few months back.
> 
> Please review the following changes to move jdk.Version to 
> jdk.lang.Runtime.Version.
> 
> Bug
> 
>    8144062: Move jdk.Version to java.lang.Runtime.Version
>    https://bugs.openjdk.java.net/browse/JDK-8144062
> 
> webrev
> 
>    http://cr.openjdk.java.net/~iris/verona/8144062/webrev.1/


The change looks fine.  Minor comments:

1178          * @throws  IllegalArgumentException
1179          *          If the given string cannot be interpreted as a valid
1180          *          version
1185          * @throws  NumberFormatException
1186          *          If an element of the version number or the build number
1187          *          cannot be represented as an {@link Integer}

It’s okay to specify @throws NumberFormatException while @throws IAE (merging the description) should be adequate (the implementation stays the same).  Something you can consider in the future.

1189          * @return  This version

It seems clearer to say "@return the Version of the given string” (this is a static method and no “This version”)

Mandy


More information about the core-libs-dev mailing list