Re: RFR: 8264208: Console charset API [v11]

2021-04-22 Thread Naoto Sato
On Thu, 22 Apr 2021 16:29:35 GMT, Roger Riggs wrote: >> Then `charset()` in the shared secret would return `null`. Would that >> suffice your case? > > I read lines 575-587 as initializing CHARSET regardless of whether the > Console was created. OK, revived the charset() method.

Re: RFR: 8264208: Console charset API [v11]

2021-04-22 Thread Roger Riggs
On Thu, 22 Apr 2021 16:11:16 GMT, Naoto Sato wrote: >> Not always, for example, if stderr was redirected to a terminal but not >> stdin and stdout. >> The istty check is only true if both stdin and stdout are ttys. > > Then `charset()` in the shared secret would return `null`. Would that

Re: RFR: 8264208: Console charset API [v11]

2021-04-22 Thread Naoto Sato
On Thu, 22 Apr 2021 16:03:12 GMT, Roger Riggs wrote: >> Would the singleton `Console.cons` be instantiated in your use case? It is >> created only when isatty() (or Windows' equivalent) in the native code >> returns true. > > Not always, for example, if stderr was redirected to a terminal but

Re: RFR: 8264208: Console charset API [v11]

2021-04-22 Thread Roger Riggs
On Thu, 22 Apr 2021 15:42:02 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/io/Console.java line 597: >> >>> 595: return null; >>> 596: } >>> 597: }); >> >> Please keep the charset() method and return CHARSET. >> >> I'm looking at a use case

Re: RFR: 8264208: Console charset API [v11]

2021-04-22 Thread Naoto Sato
On Thu, 22 Apr 2021 15:18:11 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 13 additional >> commits

Re: RFR: 8264208: Console charset API [v11]

2021-04-22 Thread Roger Riggs
On Tue, 20 Apr 2021 22:35:00 GMT, Naoto Sato wrote: >> Please review the changes for the subject issue. This has been suggested in >> a recent discussion thread for the JEP 400 >> [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. >> A CSR has also been

Re: RFR: 8264208: Console charset API [v11]

2021-04-20 Thread Naoto Sato
> Please review the changes for the subject issue. This has been suggested in > a recent discussion thread for the JEP 400 > [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. > A CSR has also been drafted, and comments are welcome >