RFR: 8357996: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [build/tools] [v2]
Volkan Yazici
vyazici at openjdk.org
Mon Jun 2 11:25:31 UTC 2025
On Mon, 2 Jun 2025 11:22:21 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Passes the `Charset` read from the `stdin.encoding` system property while creating `InputStreamReader` or `Scanner` instances for `System.in`.
>>
>> `stdin.encoding` is a recently added property for Java 25 in [JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703). Employing it throughout the entire code base is addressed by the parent ticket [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357996 this PR is addressing is a sub-task of JDK-8356893 and is concerned with only areas related to build and tools.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>
> Provide fallback for `stdin.encoding` in `ExternalEditor`
src/utils/src/build/tools/commentchecker/CommentChecker.java line 197:
> 195: try {
> 196: BufferedReader br =
> 197: new BufferedReader(new InputStreamReader(System.in, System.getProperty("stdin.encoding")));
Not providing a `Charset` fallback – `CommentChecker` build tool should better fail if an invalid `stdin.encoding` is configured.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25541#discussion_r2120845904
More information about the kulla-dev
mailing list