On Wed, 4 Feb 2026 20:47:14 GMT, Alexey Semenyuk <[email protected]> wrote:
>> 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. > > I didn't say it is a bad idea; I questioned the choice of the tool for > reading the "release" file. What if there is a class specifically targeted > for reading this file? > > I found the code in jlink that reads/writes the "release" file: > https://github.com/openjdk/jdk/blob/949370ab0e701cfcc68cb84dd0f91e5db41f4f45/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java#L111 > > It uses `java.util.Properties` and encloses the JDK version in double quotes. > So the implementation of the RuntimeVersionReader is correct. We just need it > documented and reference the ReleaseInfoPlugin class. I also suggest changing the return type of the `RuntimeVersionReader#readVersion()` from `String/Optional<String>` to `Runtime.Version/Optional<Runtime.Version>`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2766003020
