On Mon, 8 Sep 2025 16:34:29 GMT, Naoto Sato <[email protected]> wrote:

>> Providing a couple of utility methods using the "built-in" `Console` 
>> implementation to support tools that require password input, such as 
>> `keytool`, ensuring they work even when std0ut is redirected.
>
> Naoto Sato has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Fix comments

src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 137:

> 135:     }
> 136: 
> 137:     // Dedicated entry for sun.security.util.Password.

To be more clear, I suggest this comment:

    // Dedicated entry for sun.security.util.Password when stdout is redirected.
    // This method strictly avoids producing any output by using noNewLine = 
true
    // and an empty format string.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26973#discussion_r2334014703

Reply via email to