On Mon, 2 Feb 2026 20:03:09 GMT, Alexey Semenyuk <[email protected]> wrote:
>> Alexander Matveev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8357404: jpackage should attempt to get a package version from the JDK's
>> release file if the --version option is not specified [v6]
>
> src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/RuntimeVersionReader.java
> line 47:
>
>> 45: String version = props.getProperty("JAVA_VERSION");
>> 46: if (version != null) {
>> 47: version = version.replaceAll("^\"|\"$", "");
>
> Why does this function filter the value of the "JAVA_VERSION" property?
>
> It should not do any filtering; it should just read the value as its name
> suggests.
>
> Filering is platform-specific and should be a separate method.
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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2761418265