diff --git a/classpath/java/lang/StringBuffer.java b/classpath/java/lang/StringBuffer.java index beef64b68e..45528396fe 100644 --- a/classpath/java/lang/StringBuffer.java +++ b/classpath/java/lang/StringBuffer.java @@ -30,6 +30,16 @@ public class StringBuffer implements CharSequence { return this; } + public synchronized StringBuffer append(CharSequence s) { + sb.append(s); + return this; + } + + public synchronized StringBuffer append(StringBuffer s) { + sb.append(s); + return this; + } + public synchronized StringBuffer append(Object o) { sb.append(o); return this; diff --git a/classpath/java/lang/StringBuilder.java b/classpath/java/lang/StringBuilder.java index 0a322a5e69..d4e98571d7 100644 --- a/classpath/java/lang/StringBuilder.java +++ b/classpath/java/lang/StringBuilder.java @@ -54,6 +54,10 @@ public class StringBuilder implements CharSequence, Appendable { } } + public StringBuilder append(StringBuffer sb) { + return append(sb.toString()); + } + public StringBuilder append(CharSequence sequence) { return append(sequence.toString()); } @@ -104,7 +108,6 @@ public class StringBuilder implements CharSequence, Appendable { return append(String.valueOf(v)); } - public char charAt(int i) { if (i < 0 || i >= length) { throw new IndexOutOfBoundsException();