RFR: 8144062: Determine appropriate module for jdk.Version

Iris Clark iris.clark at oracle.com
Thu Feb 25 05:59:20 UTC 2016


Hi, Alan, Mandy, and Mark.

After exploring a few module options (jdk.Version, jdk.dev [0]), 
it looks like the best choice is to move jdk.Version to 
java.lang.Runtime.Version (a nested class of Runtime).  It supports 
the values returned by the java.{vm.}?version and 
java.{vm.}?specification.version system properties.  By making 
Version an SE API, it may be exported by the java.base module.

Please review the following changes to move jdk.Version to 
jdk.lang.Runtime.Version.  Note that beyond the package name and
class declaration (to static), the only other changes in Version
are related to indentation.

Bug

    8144062: Determine appropriate module for jdk.Version
    https://bugs.openjdk.java.net/browse/JDK-8144062

webrev

    http://cr.openjdk.java.net/~iris/verona/8144062/webrev.0/

Additionally, the following changes to JEP 223 [1] (modulo indentation)
will be made:

252,253c252,253
< A simple JDK-specific Java API to parse, validate, and compare version
< strings will be defined:
---
> A simple Java API to parse, validate, and compare version strings will be
> defined as a nested class of Runtime:
255c255
<     package jdk;
---
>     package java.lang;
258a259
>     public class Runtime {
283a285
>     }
309a312,315
>
> The existing specification for the above properties in
> `System.getProperties()` will be modified to indicate that the return values
> for these properties may be interpreted as a `java.lang.Runtime.Version`.

Thanks,
Iris

[0] jdk.dev renamed to jdk.jlink in jigsaw/jake.
[1] http://openjdk.java.net/jeps/223



More information about the core-libs-dev mailing list