-
Bug
-
Resolution: Fixed
-
P3
-
22
-
b26
Consider a simple module, like:
---
module test {}
---
And compile it with JDK 22 and JDK 21 using:
javac --release 21
The results of the compilations will differ: when compiling with JDK 21, the mandated java.base dependency will get a version, possibly like "21-internal". When compiling with JDK 22, the version of the java.base dependency will be empty.
Even though the compilation with different versions of JDK may not lead to the same classfiles, the difference in recorded module versions seem unnecessary and wrong. Preferably, the recorded version should be simply "21" in both these cases.
---
module test {}
---
And compile it with JDK 22 and JDK 21 using:
javac --release 21
The results of the compilations will differ: when compiling with JDK 21, the mandated java.base dependency will get a version, possibly like "21-internal". When compiling with JDK 22, the version of the java.base dependency will be empty.
Even though the compilation with different versions of JDK may not lead to the same classfiles, the difference in recorded module versions seem unnecessary and wrong. Preferably, the recorded version should be simply "21" in both these cases.
- csr for
-
JDK-8319842 The module-infos for --release data do not contain pre-set versions
-
- Closed
-
- duplicates
-
JDK-8318912 The module-infos for --release data do not contain pre-set versions
-
- Closed
-
- relates to
-
JDK-8323675 Race in jdk.javadoc-gendata
-
- Resolved
-