On Thu, 20 Aug 2026 18:32:43 GMT, Sean Mullan <[email protected]> wrote:
>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SecurityPropertiesPlugin.java
>> line 117:
>>
>>> 115: // replacing values of overridden properties as we go
>>> 116: try (InputStreamReader isr = new InputStreamReader(content);
>>> 117: BufferedReader br = new BufferedReader(isr)) {
>>
>> SecPropLoader.loadFromPath uses Properties.load and so is using 8859-1. The
>> plugin is using UTF-8 (default charset) so not in sync.
>
> Good point! The JDK build actually assumes the `java.security` file is UTF-8
> when it writes it out so maybe that is already a bug. It's all ASCII though
> so there hasn't been any issues.
>
> As long as it is all ASCII, there will never be a conflict using either. But
> I should probably assume 8859-1 just in case there are prop files out there
> with non-ASCII characters that are not escaped. Will try some experiments but
> let me know if you have any suggestions.
Fixed in
https://github.com/openjdk/jdk/pull/31884/changes/3d7abfc4b07bdd1007b99a47c147166fd1e00d18.
All writes and reads use 8859-1.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31884#discussion_r3847221966