jdk/src/share/classes/java/lang/StringBuffer.java
changeset 17709 fc6f678fdb83
parent 17472 4ce9bd9f56ac
child 24865 09b1d992ca72
equal deleted inserted replaced
17708:eccbcb1b38be 17709:fc6f678fdb83
   333      * @param   s the {@code CharSequence} to append.
   333      * @param   s the {@code CharSequence} to append.
   334      * @return  a reference to this object.
   334      * @return  a reference to this object.
   335      * @since 1.5
   335      * @since 1.5
   336      */
   336      */
   337     @Override
   337     @Override
   338     public StringBuffer append(CharSequence s) {
   338     public synchronized StringBuffer append(CharSequence s) {
   339         // Note, synchronization achieved via invocations of other StringBuffer methods after
   339         toStringCache = null;
   340         // narrowing of s to specific type
       
   341         // Ditto for toStringCache clearing
       
   342         super.append(s);
   340         super.append(s);
   343         return this;
   341         return this;
   344     }
   342     }
   345 
   343 
   346     /**
   344     /**