On Wed, 27 Aug 2025 23:48:28 GMT, Naoto Sato <na...@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: > > @Native annotated src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 117: > 115: return INSTANCE.orElseSet(() -> { > 116: // If there's already a proper console, throw an exception > 117: if (System.console() != null) { Since this initializes the console, this means the console can only be available when there is no provider and stdin is tty, but stdout is not. Is this intended? (In other words, should we make System.console() lazy, as it is initialized with java.io.Console as Console.cons?) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26973#discussion_r2307460301