# HG changeset patch # User sherman # Date 1522251765 25200 # Node ID 1801fada294a0022fa6ee74fc08317d2156c1183 # Parent c31b6e1c4383a52ba11c027decf71bf7eda951b0 8197881: Better StringBuilder support Reviewed-by: rriggs diff -r c31b6e1c4383 -r 1801fada294a src/java.base/share/classes/java/lang/AbstractStringBuilder.java --- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java Thu Mar 08 14:04:39 2018 +0800 +++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java Wed Mar 28 08:42:45 2018 -0700 @@ -69,10 +69,13 @@ */ int count; + private static final byte[] EMPTYVALUE = new byte[0]; + /** * This no-arg constructor is necessary for serialization of subclasses. */ AbstractStringBuilder() { + value = EMPTYVALUE; } /**