RFR JDK-8210345: The Japanese message of FileNotFoundException garbled

Xueming Shen xueming.shen at oracle.com
Fri Sep 7 07:41:13 UTC 2018


Hi

Please help review the changeset for JDK-8210345.

issue: https://bugs.openjdk.java.net/browse/JDK-8210345
webrev: http://cr.openjdk.java.net/~sherman/8210345/webrev

This is a "regression" from the change we made for JDK-8200243 [1], in 
which the
getLastErrorString() for windows platform was updated back to use the 
platform
encoding, instead of the incorrect utf8. However the corresponding 
change (to use
JNU_NewStringPlatform to encode the err msg) in io_util.c was missed out.

We currently don't have a auto-regression test with corresponding 
machine_locale
setup/configuration for this one, Pallavi.Sonal kindly helped to 
verified it manually
on his local setup (see attached). It would be desired to have a 
specific testing
configuration to catch such error going forward, but it would be better done
separately.

Thanks,
Sherman

[1] 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-June/054140.html

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

I could run the test case with you mach5 download and it is giving expected output :
C:\Test>C:\Test\jdk-12\bin\java -showversion JI9057040
java version "12-internal" 2019-03-19
Java(TM) SE Runtime Environment 19.3 (build 12-internal+0-2018-09-05-0009528.xueming.shen.jdk12)
Java HotSpot(TM) 64-Bit Server VM 19.3 (build 12-internal+0-2018-09-05-0009528.xueming.shen.jdk12, mixed mode)
ja_JP
java.io.FileNotFoundException: testabc.txt (指定されたファイルが見つかりません。)
         at java.base/java.io.FileInputStream.open0(Native Method)
         at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
         at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
         at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
         at java.base/java.io.FileReader.<init>(FileReader.java:60)
         at JI9057040.main(JI9057040.java:10)
testabc.txt (指定されたファイルが見つかりません。)
testabc.txt (指定されたファイルが見つかりません。)





More information about the core-libs-dev mailing list