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

Naoto Sato naoto at openjdk.org
Mon Dec 12 17:15:36 UTC 2022


> 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.

Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:

  Modified @link comment in the snippet

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

Changes:
  - all: https://git.openjdk.org/jdk20/pull/14/files
  - new: https://git.openjdk.org/jdk20/pull/14/files/ce1df2fd..7e2ad71d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk20&pr=14&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=14&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk20/pull/14.diff
  Fetch: git fetch https://git.openjdk.org/jdk20 pull/14/head:pull/14

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


More information about the core-libs-dev mailing list