On Thu, 17 Jul 2025 07:40:28 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wording modification > > src/java.base/share/classes/java/io/Console.java line 51: > >> 49: * console. Regardless of how the virtual machine was created, it may not >> 50: * have a console if either the standard input or output stream is >> 51: * redirected. > > Can you clarify what the intent of "it may not have a console" is? Initially > I though the intention was that there is no Console when either stdout or > stdin is redirected. However, the sentence suggests there may or may not be a > Console. I was considering the case for `jshell`, where its `System.console()` returns a `Console` instance regardless of the `isTTY` state: https://github.com/openjdk/jdk/blob/bd55d7a49514da9fa4de0d4a372956e21deab4d2/src/jdk.jshell/share/classes/jdk/jshell/execution/impl/ConsoleImpl.java#L70 That led me to use `may` in the updated spec. I'd appreciate your suggestions on wording. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26299#discussion_r2213837754