Integrated: 8361972: Clarify the condition of System.console() about standard input/output

Naoto Sato naoto at openjdk.org
Tue Aug 26 21:54:44 UTC 2025


On Mon, 14 Jul 2025 17:15:57 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> This accompanies the fix for [JDK-8361613](https://bugs.openjdk.org/browse/JDK-8361613), which restricts `System.console()` to return a `Console` instance only when both standard input and output are connected to a terminal. The change here is solely a specification clarification and tightening of the `java.io.Console` javadoc to reflect this behavior. We are separating the spec clarification because the fix itself may be backported to prior LTS releases without requiring a Maintenance Review process.

This pull request has now been integrated.

Changeset: 69645fd4
Author:    Naoto Sato <naoto at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/69645fd4ba5c0a7e20727f5d85d87cefc40e8c70
Stats:     18 lines in 1 file changed: 1 ins; 5 del; 12 mod

8361972: Clarify the condition of System.console() about standard input/output

Reviewed-by: smarks, jlu, joehw

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

PR: https://git.openjdk.org/jdk/pull/26299


More information about the core-libs-dev mailing list