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

Goetz Lindenmaier goetz at openjdk.org
Thu Feb 5 13:29:27 UTC 2026


> 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.

Goetz Lindenmaier has updated the pull request incrementally with one additional commit since the last revision:

  remove unused test files

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

Changes:
  - all: https://git.openjdk.org/jdk21u-dev/pull/2592/files
  - new: https://git.openjdk.org/jdk21u-dev/pull/2592/files/a7408a2d..d2615de5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2592&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2592&range=00-01

  Stats: 69 lines in 2 files changed: 0 ins; 69 del; 0 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/2592.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/2592/head:pull/2592

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


More information about the jdk-updates-dev mailing list