-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8372155: ReleaseInfoPlugin doesn't handle input file as UTF-8 properly #28399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
8372155: ReleaseInfoPlugin doesn't handle input file as UTF-8 properly #28399
Conversation
|
👋 Welcome back sgehwolf! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
Webrevs
|
|
Hello Severin, would it better to (even) specify the expectations of the I might be wrong, but even with the use of |
|
Thanks for the review.
IIUYC, you'd like to have the help text amended for IMO it would be best for
True. If somebody passes an ISO-8859-1 (or any non-utf8) encoded file to |
Correct, but not necessarily UTF-8. I am not familiar where all this release-info gets used during jlink and then in the generated image. So whatever encoding is appropriate for such content, I think we should specify it, in the help text and man page of jlink. |
It expects the input file to be UTF-8 now. So I've added that the plugin help text in 2f48c81
It's the plugin that creates the
I've added it to the |
It's very likely that tools that read the release file aren't using Properties API so I think having it UTF-8 is best. |
The output Question is if it's worth supporting arbitrary input encondings for |
That seems unnecessary complexity, I think we should just keep it as UTF-8. |
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java
Outdated
Show resolved
Hide resolved
|
Please fix the typo in the PR title. (I corrected the issue title). |
Please review this simple fix to
jlink's--release-infoplugin to handle non-ASCII in vendor strings. The JDK build uses UTF-8 encoding for the producedreleasefile that is being passed tojlinkat build-time via the--release-infoplugin. However, the plugin internally usesjava.util.Properties.load(InputStream)API which assumesISO-8859-1encoding of the input stream. The proposed fix is to use thejava.util.Prorperties.load(Reader)API instead and pass it anInputStreamReaderwithUTF-8encoding.Testing:
test/jdk/tools/jlinktests including the new reg-test which fails prior and passes after the fix.Thoughts?
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28399/head:pull/28399$ git checkout pull/28399Update a local copy of the PR:
$ git checkout pull/28399$ git pull https://git.openjdk.org/jdk.git pull/28399/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28399View PR using the GUI difftool:
$ git pr show -t 28399Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28399.diff
Using Webrev
Link to Webrev Comment