RFR: 8357404: jpackage should attempt to get a package version from the JDK's release file if the --version option is not specified [v2]
Alexander Matveev
almatvee at openjdk.org
Fri Jan 16 05:05:43 UTC 2026
On Fri, 16 Jan 2026 04:44:24 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
> > normalizeVersion() should be called only for runtime installer, otherwise it will normalize version read from module.
>
> Isn't it the right thing to do in general, even though unrelated to the subject of this PR?
Not sure. Do we want to normalize module version? What possible format for module version?
https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/module/ModuleDescriptor.Version.html
Module version is more complicated then release file. It can contain "-", "+" and any characters if I am reading doc file correctly.
>
> Maybe step back, file a CR to implement version normalization, and implement version reading from the "release" file on top of it?
Not sure. I think we can file a bug to normalize module version for all platforms to "N.N.N..." (just numbers and "."). Then remove platform specific normalization check for runtime installer only. In this case it should just work. Having generic normalization for both module, release file or anything else is probably over complicated. Platform specific code should just handle numbers and digit for normalization and code which reads module version or anything else should provide all numbers and digits.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29260#issuecomment-3758174327
More information about the core-libs-dev
mailing list