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

Naoto Sato naoto at openjdk.org
Mon Dec 12 18:02:21 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.

This pull request has now been integrated.

Changeset: 0267aa52
Author:    Naoto Sato <naoto at openjdk.org>
URL:       https://git.openjdk.org/jdk20/commit/0267aa528b83be9914fee4bea8f548b8404b31f8
Stats:     16 lines in 1 file changed: 4 ins; 0 del; 12 mod

8297288: Example code in Scanner class

Reviewed-by: lancea, bpb, alanb

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

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


More information about the core-libs-dev mailing list