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

2022-12-12 Thread Naoto Sato
On Sat, 10 Dec 2022 08:15:49 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Modified @link comment in the snippet > > src/java.base/share/classes/java/util/Scanner.java line 58: > >> 56: * va

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

2022-12-12 Thread Alan Bateman
On Mon, 12 Dec 2022 17:11:54 GMT, Naoto Sato 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. > > Naoto

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

2022-12-12 Thread Naoto Sato
> 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 ad

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

2022-12-10 Thread Alan Bateman
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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. src/java.bas

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

2022-12-09 Thread Naoto Sato
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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. Yes. This is

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

2022-12-09 Thread Jim Laskey
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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. You're chang

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

2022-12-09 Thread Brian Burkhalter
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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. Marked as re

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

2022-12-09 Thread Lance Andersen
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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. Looks good w

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

2022-12-09 Thread Naoto Sato
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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 requ

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

2022-12-09 Thread Jim Laskey
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato 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. CSR? --

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

2022-12-09 Thread Naoto Sato
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. - Commit messages: - 8297288: Example code in Scanner cla