RFR: 8372155: RealeaseInfoPlugin doesn't handle input file as UTF-8 properly [v3]

Severin Gehwolf sgehwolf at openjdk.org
Thu Nov 20 13:38:16 UTC 2025


> Please review this simple fix to `jlink`'s `--release-info` plugin to handle non-ASCII in vendor strings. The JDK build uses UTF-8 encoding for the produced `release` file that is being passed to `jlink` at build-time via the `--release-info` plugin. However, the plugin internally uses `java.util.Properties.load(InputStream)` API which assumes `ISO-8859-1` encoding of the input stream. The proposed fix is to use the `java.util.Prorperties.load(Reader)` API instead and pass it an `InputStreamReader` with `UTF-8` encoding.
> 
> Testing:
> - [x] GHA
> - [x] `test/jdk/tools/jlink` tests including the new reg-test which fails prior and passes after the fix.
> 
> Thoughts?

Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:

  Review feedback from Alan

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28399/files
  - new: https://git.openjdk.org/jdk/pull/28399/files/2f48c81b..580b4b13

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28399&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28399&range=01-02

  Stats: 13 lines in 2 files changed: 3 ins; 3 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/28399.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28399/head:pull/28399

PR: https://git.openjdk.org/jdk/pull/28399


More information about the core-libs-dev mailing list