< prev index next >

src/java.base/share/classes/java/lang/StringBuffer.java

Print this page
rev 54260 : 8221430: StringBuffer(CharSequence) constructor truncates when -XX:-CompactStrings specified

*** 160,170 **** * * @param seq the sequence to copy. * @since 1.5 */ public StringBuffer(CharSequence seq) { ! super(String.LATIN1, seq.length(), 16); append(seq); } /** * Compares two {@code StringBuffer} instances lexicographically. This method --- 160,170 ---- * * @param seq the sequence to copy. * @since 1.5 */ public StringBuffer(CharSequence seq) { ! super(getCharSequenceCoder(seq), seq.length(), 16); append(seq); } /** * Compares two {@code StringBuffer} instances lexicographically. This method
< prev index next >