RFR: 8366261: Provide utility methods for sun.security.util.Password [v6]
Weijun Wang
weijun at openjdk.org
Tue Sep 9 15:29:44 UTC 2025
On Mon, 8 Sep 2025 16:34:29 GMT, Naoto Sato <naoto at openjdk.org> 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
More information about the core-libs-dev
mailing list