RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core]
Weijun Wang
weijun at openjdk.org
Tue Jun 3 16:37:53 UTC 2025
On Fri, 30 May 2025 13:59:06 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
> > Have you thought about creating a helper method for this purpose even if it's internal? At least, for the tests you can create one in `/test/lib`.
>
> Required changes are pretty minimal – passing `System.getProperty("stdin.encoding")` as an argument to the ctor. I doubt adding an extra layer of indirection (plus the need for changes in `@build` and `@library` tags) will worth it.
I’m just not sure if we’ll end up changing the rule again in the future. Hardcoding the system property name makes me a bit uneasy, and the default fallback being hardcoded as well adds to that concern.
That said, the changes to the security tools look good and should work as expected.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25544#issuecomment-2936243501
More information about the serviceability-dev
mailing list