RFR: 8264208: Console charset API [v11]

Naoto Sato naoto at openjdk.java.net
Thu Apr 22 16:14:22 UTC 2021


On Thu, 22 Apr 2021 16:03:12 GMT, Roger Riggs <rriggs at openjdk.org> 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 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 suffice your case?

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

PR: https://git.openjdk.java.net/jdk/pull/3419



More information about the security-dev mailing list