[jdk20] RFR: 8297288: Example code in Scanner class

Naoto Sato naoto at openjdk.org
Fri Dec 9 21:10:33 UTC 2022


On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> The example in `Scanner` directly uses `System.in` which may cause unwanted behavior when the default charset and the console charset differ. Using `Console.reader()` is more appropriate. Also changed examples into snippets.

Does it require a CSR? I thought modifying the examples did not change any API/behavior thus a CSR was not needed. I am happy to file it if that's not the case.

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

PR: https://git.openjdk.org/jdk20/pull/14


More information about the core-libs-dev mailing list