Closed satob closed 11 months ago
I struggle reproducing it. What exact Java version do you use and what language setting do you use and where is it configured (operating system, JAVA_OPTS, ...)?
I had reproduced the problem with OpenJDK 17.0.9 on Windows 11 version 22H2 (Build 22621.2428) Japanese environment.
The output of java --version
is like this:
openjdk 17.0.9 2023-10-17
OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode, sharing)
The output of Get-WinSystemLocale
is like this:
LCID Name DisplayName
---- ---- -----------
1041 ja-JP 日本語 (日本)
JAVA_OPTS
is empty.
Thank you! I've been testing this on MacOS trying to switch language to French/Spanish etc. Apparently, I didn't switch language correctly as my java was still printing messages in English. And what was the sample output for this failed assertion in Japanese? I'm asking because I want to know if there were still any fragments in English, I could assert on.
Thanks. I reproduced this. It turned out that javac
has localization in Japanese but not in European languages I tried.
Problem
When you run
mvn test
on a non-English environment, the testJavaSyntax17CompilationTest.testInstrumentationAndCompilation_17_NonReifiableTypes
will fail with the following error:Solution
Setting
-Duser.language=en
toJAVA_TOOL_OPTIONS
fixes this problem.Note
The following workarounds didn't work for me:
-DargLine
option likemvn -DargLine="-Duser.language=en" test
<user.language>en</user.language>
to<configuration>
ofmaven-compiler-plugin