-
Bug
-
Resolution: Fixed
-
P4
-
21, 22, 23
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8344469 | 21.0.7-oracle | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
JDK-8345174 | 21.0.6 | Severin Gehwolf | P4 | Resolved | Fixed | b06 |
JDK-8344523 | 17.0.15-oracle | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
JDK-8346643 | 17.0.15 | Goetz Lindenmaier | P4 | Resolved | Fixed | master |
JDK-8346959 | 11.0.27-oracle | Hari Rakesh | P4 | Resolved | Fixed | b01 |
Java version:
openjdk version "23-internal" 2024-09-17
OpenJDK Runtime Environment (build 23-internal-adhoc.Administrator.jdk)
OpenJDK 64-Bit Server VM (build 23-internal-adhoc.Administrator.jdk, mixed mode, sharing)
Environment:
I tested on Windows 10.
$ locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_ALL=
Exception:
java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:279)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:405)
at java.base/sun.nio.cs.StreamDecoder.lockedRead(StreamDecoder.java:217)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:190)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:160)
at java.base/java.io.BufferedReader.implReadLine(BufferedReader.java:370)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:347)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:436)
at java.base/java.nio.file.Files.readAllLines(Files.java:3419)
at NewLineTest.main(NewLineTest.java:61)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1575)
I verified this test passed on English Windows and Linux. Also, this problem does not occur in jdk17.
This exception is probably related to the change in default charset in JEP 400.
The exception message indicates that it failed to read a file to which the output of javac run in the test was redirected. JEP400 changed Charset.defaultCharset() to return UTF-8. However, the encoding of Javac's standard output is still derived from the host environment and/or the user's settings. As a result, the test fails on Windows with non-English locale in jdk18 and later.
- backported by
-
JDK-8344469 langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
- Resolved
-
JDK-8344523 langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
- Resolved
-
JDK-8345174 langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
- Resolved
-
JDK-8346643 langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
- Resolved
-
JDK-8346959 langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
- Resolved
- links to
-
Commit(master) openjdk/jdk17u-dev/7203110a
-
Commit(master) openjdk/jdk21u-dev/2dd73179
-
Commit(master) openjdk/jdk/1b0281dc
-
Review(master) openjdk/jdk17u-dev/3144
-
Review(master) openjdk/jdk21u-dev/1132
-
Review(master) openjdk/jdk/19519