Summary
We propose to finalize the module imports Java feature. Currently, there the only non-editorial change to the specification under consideration is to limit the requires transitive java.base;
only for classfiles of version 69.
Problem
The module imports Java feature have been through two rounds of preview. The experience suggests we can make the feature final and permanent.
Solution
The module imports Java feature will be finalized mostly as-is. Specifications will undergo editorial changes. The only non-editorial change under consideration will be to limit the allowance of requires transitive java.base;
in the Java Virtual Machine Specification to only classfiles with major version at least 69. (In addition to the permitting the same for classfile version 53, as has been permitted.)
Specification
The updated specifications will be uploaded before Finalization of this request.
For convenience, the specifications for the previous round are:
- the Java language specification: https://cr.openjdk.org/~gbierman/jep494/jep494-20241024/specs/module-import-declarations-jls.html
- the Java virtual machine specification: https://cr.openjdk.org/~gbierman/jep494/jep494-20241024/specs/module-import-declarations-jvms.html
The only change currently under specification is a change along these lines in the JVMS:
If the class file version number is 54.0 or above, a requires_flags item that has both the ACC_TRANSITIVE and ACC_STATIC_PHASE flags not set.
=>
If the class file version number is 69.0 or above, a requires_flags item that the ACC_STATIC_PHASE flag not set
If the class file version number is below 69.0, but is 54.0 or above, a requires_flags item that has both the ACC_TRANSITIVE and ACC_STATIC_PHASE flags not set.
The copies of the specifications are attached.
- csr of
-
JDK-8344708 Compiler Implementation of Module Import Declarations
-
- Open
-