RFR: 8361613: System.console() should only be available for interactive terminal [v3]
Alan Bateman
alanb at openjdk.org
Tue Jul 15 13:31:51 UTC 2025
On Tue, 15 Jul 2025 13:25:16 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Reflects review comments
>
> src/java.base/share/classes/java/lang/System.java line 244:
>
>> 242: *
>> 243: * @return The system console, if any, otherwise {@code null}.
>> 244: * @see Console
>
> The method declaration already links to Console so I don't think we need another link in the "See also" section.
Maybe I missed it, but do we have anything to make it clear that it returns null if either stdin or stdout are redirected?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26273#discussion_r2207483449
More information about the compiler-dev
mailing list