RFR(XXS): 8149519: Investigate implementation of java.specification.version
Alan.Bateman at oracle.com
Wed Apr 27 09:15:17 UTC 2016
On 27/04/2016 09:28, Volker Simonis wrote:
> Ping - shouldn't we fix this issue before JDK 9 Feature Complete?
> Could you please also comment on my remarks regarding the relation of
> java.lang.Package.getSpecificationVersion() to JEP and 223 and and my
> question why the Version class is not in a standard java package.
One thing to be aware of is that specification for legacy
java.lang.Package has been significantly overhauled as part of updating
the platform to support modules. The javadoc to read is the updated
class description where it specifies the properties of Packages
automatically created for types in named modules, also the API note in
the 8-parameter ClassLoader.definePackage method. The TL;DR summary is
that getSpecificationVersion() will return null when invoking on Package
objects for any types in any of the system module (or any of the modules
on the module path too). So I don't think JEP 223 needs to be concerned
JDK-8144062 is tracking the replacement of jdk.Version with a standard API.
More information about the verona-dev