< prev index next >

src/java.base/share/classes/java/lang/StringBuffer.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>

*** 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(getCharSequenceCoderHint(seq), seq.length(), 16); append(seq); } /** * Compares two {@code StringBuffer} instances lexicographically. This method
< prev index next >