< prev index next >

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

Print this page
rev 54291 : 8221430: StringBuffer(CharSequence) constructor truncates when -XX:-CompactStrings specified
Reviewed-by: igerasim, rriggs
Contributed-by: Andrew Leonard <andrew_m_leonard@uk.ibm.com>

*** 132,142 **** * {@code CharSequence} argument. * * @param seq the sequence to copy. */ public StringBuilder(CharSequence seq) { ! super(String.LATIN1, seq.length(), 16); append(seq); } /** * Compares two {@code StringBuilder} instances lexicographically. This method --- 132,142 ---- * {@code CharSequence} argument. * * @param seq the sequence to copy. */ public StringBuilder(CharSequence seq) { ! super(getCharSequenceCoderHint(seq), seq.length(), 16); append(seq); } /** * Compares two {@code StringBuilder} instances lexicographically. This method
< prev index next >