RFR: 8357404: jpackage should attempt to get a package version from the JDK's release file if the --version option is not specified [v6]

Alexander Matveev almatvee at openjdk.org
Wed Feb 4 20:18:37 UTC 2026


On Wed, 4 Feb 2026 03:35:55 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> For some reason `JAVA_VERSION` is set to quoted string and `getProperty()` will return `"27"` instead of `27`. I think `"` is not truly part of version string and `replaceAll()` removes it. I do not think that removing leading and trailing `"` should be platform specific.
>
> Please add a comment explaining this.
> We also need a test case where the property value is not enclosed in double quotes.
> 
> Makes me wonder: is java.util.Properties the correct choice for reading the "release" file?

I do not see why using `java.util.Properties` to read "release" file is bad idea. "release" file is key-value file. `java.util.Properties` does not remove leading and trailing quotes based on documentation. I updated unit test to cover quoted and unquoted values. Including empty value.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2765815486


More information about the core-libs-dev mailing list