-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexOf method of String file fails using Eclipse OpenJ9 VM 11.0.22.0 #19334
Comments
I further simplified the example class |
Running with |
It's even worse: any String longer than 1 character including anything needing UTF-8 multibyte encoding will not be found. So "ä!", "!ä" or "wörd" won't work. Yikes! |
Thanks and pardon me: we are only talking about the .indexOf() method. |
LATIN1 String constants were only created in jdk17 and later. The JCL for jdk11 creates LATIN1 Strings and the VM needs to match. Issue eclipse-openj9#19334 Signed-off-by: Peter Shipton <[email protected]>
LATIN1 String constants were only created in jdk17 and later. The JCL for jdk11 creates LATIN1 Strings and the VM needs to match. Issue eclipse-openj9#19334 Signed-off-by: Peter Shipton <[email protected]>
The fix is released into the upcoming 0.44 release, expected by early May. |
An open source pre-release 0.44 Windows build with the fix. Let me know if you want a direct link to another platform. The full builds: |
Linux amd64 and arm64 build please? |
thank you very much :-) |
Java -version output
openjdk version "11.0.22" 2024-01-16
IBM Semeru Runtime Open Edition 11.0.22.0 (build 11.0.22+7)
Eclipse OpenJ9 VM 11.0.22.0 (build openj9-0.43.0, JRE 11 Windows 11 amd64-64-Bit Compressed References 20240131_835 (JIT enabled, AOT enabled)
OpenJ9 - 2c3d78b
OMR - ea8124dbc
JCL - 7876cac747 based on jdk-11.0.22+7)
Summary of problem
The attached simple class demonstrates that the 'indexOf' method fails after reading a string stored in an xml property file.
After execution with the above5ra indicated jsk the output is:
The string: Field1ç°^§|Field2 does NOT contains ç°^§|
Attention:
openjdk version "11.0.20" 2023-07-18
IBM Semeru Runtime Open Edition 11.0.20.0 (build 11.0.20+8)
Eclipse OpenJ9 VM 11.0.20.0 (build openj9-0.40.0, JRE 11 Windows 11 amd64-64-Bit Compressed References 20230810_700 (JIT enabled, AOT enabled)
OpenJ9 - d12d10c
OMR - e80bff83b
JCL - f53b132192 based on jdk-11.0.20+8)
and older jdk version, it works.
The output is:
The string: Field1ç°^§|Field2 contains ç°^§|
openjdk version "17.0.10" 2024-01-16
IBM Semeru Runtime Open Edition 17.0.10.0 (build 17.0.10+7)
Eclipse OpenJ9 VM 17.0.10.0 (build openj9-0.43.0, JRE 17 Windows 11 amd64-64-Bit Compressed References 20240116_624 (JIT enabled, AOT enabled)
OpenJ9 - 2c3d78b
OMR - ea8124dbc
JCL - 2aad089841f based on jdk-17.0.10+7)
The output is:
The string: Field1ç°^§|Field2 contains ç°^§|
So it works with 17 too
TestIndexOf.java.txt
The text was updated successfully, but these errors were encountered: