Please review the change at http://cr.openjdk.java.net/~jgish/Bug6206780-sb-append-forward

Overview --

 * introduced consistent forwarding to AbstractStringBuilder from
   StringBuffer and StringBuilder for append and other methods per the
   bug report.
 * Added missing @Override annotations.
 * Got rid of knowledge of the sub-classes from ASB (smelled too bad to
   leave in).
 * Retained all methods to maintain compatibility (even though some
   like append(StringBuffer) could go away because append(CharSequence)
   would do).
 * To further maintain compatibility, used sychronized(this) in place
   of adding synchronized methods to those methods in StringBuffer that
   now need it (because of type-based dispatch being done in super
   rather than in /both/ StringBuffer and StringBuilder with
   CharSequence args).
 * Ensured that StringBuffer.append(StringBuilder) and
   StringBuilder.append(StringBuffer) are both handled properly.


Thanks,
   Jim

--
Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304
Oracle Java Platform Group | Core Libraries Team
35 Network Drive
Burlington, MA 01803
jim.g...@oracle.com

Reply via email to