You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown in the following test case,when OpenJ9-jdk8 (using the CompactStrings parameter) calls the "insert (int index, String str)" function to insert, if the character array assigned to "str" contains "Character. MAX_VALUE", the last part of characters in the result will be discarded.
I don't know the reason for this result. I applied the same parameter to OpenJ9-jdk-11, but the same result did not appear.
Environment:
Ubuntu 18.04 x86_64
JVM Information:
jdk8:
OpenJDK Runtime Environment (build 1.8.0_332-internal-_2022_02_17_10_23-b00)
Eclipse OpenJ9 VM (build master-39c490eaf, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20220217_000000 (JIT enabled, AOT enabled)
OpenJ9 - 39c490eaf
OMR - b63287860
JCL - 301202f49f based on jdk8u332-b02)
jdk11:
OpenJDK Runtime Environment (build 11.0.15-internal+0-adhoc..openj9-openjdk-jdk11)
Eclipse OpenJ9 VM (build master-39c490eaf, JRE 11 Linux amd64-64-Bit Compressed References 20220217_000000 (JIT enabled, AOT enabled)
OpenJ9 - 39c490eaf
OMR - b63287860
JCL - 24e7209ed4 based on jdk-11.0.15+1)
Testcase:
public class Test {
public static void main(String[] args) throws Exception {
char[] stra = { '1',Character.MAX_VALUE};
StringBuilder sb = new StringBuilder("12345");
sb.insert(0, stra);
System.out.println(sb.toString());
}
}
Output of JDK8(with -XX:+CompactStrings):
1?123
Output of JDK8(default):
1?12345
Output of JDK11(default)/JDK11(with -XX:+CompactStrings):
1?12345
The text was updated successfully, but these errors were encountered:
Description:
As shown in the following test case,when OpenJ9-jdk8 (using the CompactStrings parameter) calls the "insert (int index, String str)" function to insert, if the character array assigned to "str" contains "Character. MAX_VALUE", the last part of characters in the result will be discarded.
I don't know the reason for this result. I applied the same parameter to OpenJ9-jdk-11, but the same result did not appear.
Environment:
JVM Information:
jdk8:
jdk11:
Testcase:
Output of JDK8(with -XX:+CompactStrings):
Output of JDK8(default):
Output of JDK11(default)/JDK11(with -XX:+CompactStrings):
The text was updated successfully, but these errors were encountered: