-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 13
-
Component/s: core-libs
-
b16
-
Verified
If Compact Strings is disabled, the StringBuffer/StringBuilder(CharSequence)
constructor truncates the string in half, eg:
StringBuffer sb2 = new StringBuffer((CharSequence)new StringBuffer("test2"));
System.out.println(sb2);
System.out.println(sb2.toString().equals("test2"));
Results in output ==>
tes
false
JDK13 regression from changeJDK-8218227
constructor truncates the string in half, eg:
StringBuffer sb2 = new StringBuffer((CharSequence)new StringBuffer("test2"));
System.out.println(sb2);
System.out.println(sb2.toString().equals("test2"));
Results in output ==>
tes
false
JDK13 regression from change
- relates to
-
JDK-8218227 StringBuilder/StringBuffer constructor throws confusing NegativeArraySizeException
-
- Resolved
-