[jdk21u-dev] Integrated: 8361613: System.console() should only be available for interactive terminal

Goetz Lindenmaier goetz at openjdk.org
Tue Feb 17 08:16:46 UTC 2026


On Mon, 2 Feb 2026 12:06:06 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:

> Had to adapt change to JdkConsoleProviderImpl.java. Touched method looks quite different.
> 
> Omitted change to test/jdk/java/io/Console/DefaultCharsetTest.java
> which was added by  "https://bugs.openjdk.org/browse/JDK-8341975: Unable to set encoding for IO.println, IO.print and IO.readln" in 24
> Omitted change to test/jdk/java/io/Console/LocaleTest.java
> which was added by "https://bugs.openjdk.org/browse/JDK-8330276: Console methods with explicit Locale" 23. Has CSR and Release Note.
> Omitted change to test/jdk/java/lang/IO/IO.java
> which was added by "https://bugs.openjdk.org/browse/JDK-8344706: Implement JEP 512: Compact Source Files and Instance Main Methods"
> 
> Trivially resolved ModuleSelectionTest.java.
> 
> Omitted change to test/jdk/jdk/internal/jline/JLineConsoleProviderTest.java
> which was added by "https://bugs.openjdk.org/browse/JDK-8331535: Incorrect prompt for Console.readLine" in 23. Backport?
> Omitted change to test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java
> which was added by "https://bugs.openjdk.org/browse/JDK-8333086: Using Console.println is unnecessarily slow due to JLine initalization" in 23.
> test/jdk/jdk/internal/jline/RedirectedStdOut.java cannot be deleted/moved
> It was added by "https://bugs.openjdk.org/browse/JDK-8330998: System.console() writes to stderr when stdout is redirected" in 23.
> 
> I'm not sure what to do with files locale.exp and defaultCharset.exp.  They would be used by the omitted tests.

This pull request has now been integrated.

Changeset: 5188fe31
Author:    Goetz Lindenmaier <goetz at openjdk.org>
URL:       https://git.openjdk.org/jdk21u-dev/commit/5188fe31a0051c659f8ea806534d149fa8007a24
Stats:     95 lines in 4 files changed: 83 ins; 4 del; 8 mod

8361613: System.console() should only be available for interactive terminal

Reviewed-by: rschmelter
Backport-of: ae0dac43c09377c87e9b0452618a5b32c8568150

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

PR: https://git.openjdk.org/jdk21u-dev/pull/2592


More information about the jdk-updates-dev mailing list