--- a/jdk/src/share/classes/java/nio/StringCharBuffer.java Mon Apr 13 18:20:51 2009 -0700
+++ b/jdk/src/share/classes/java/nio/StringCharBuffer.java Wed Apr 15 14:53:34 2009 +0100
@@ -102,10 +102,12 @@
public final CharBuffer subSequence(int start, int end) {
try {
int pos = position();
- return new StringCharBuffer(str, -1,
+ return new StringCharBuffer(str,
+ -1,
pos + checkIndex(start, pos),
pos + checkIndex(end, pos),
- remaining(), offset);
+ capacity(),
+ offset);
} catch (IllegalArgumentException x) {
throw new IndexOutOfBoundsException();
}