diff options
author | Elliott Hughes <enh@google.com> | 2013-06-13 21:08:14 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-06-13 21:08:15 +0000 |
commit | cf353b74ba45a796fdc0d0e334dc40968d57066e (patch) | |
tree | 2d1adfac59bcf76522779df7ef4801679b731a52 /luni | |
parent | 799998013b609bbce50cac6a887a6be2ba453bd1 (diff) | |
parent | 40b4f1db4031eff92cb0b31740b6e644b8e4c733 (diff) | |
download | libcore-cf353b74ba45a796fdc0d0e334dc40968d57066e.zip libcore-cf353b74ba45a796fdc0d0e334dc40968d57066e.tar.gz libcore-cf353b74ba45a796fdc0d0e334dc40968d57066e.tar.bz2 |
Merge "Fix CharBuffer.subSequence return type."
Diffstat (limited to 'luni')
4 files changed, 4 insertions, 6 deletions
diff --git a/luni/src/main/java/java/nio/ByteBufferAsCharBuffer.java b/luni/src/main/java/java/nio/ByteBufferAsCharBuffer.java index ef5c52d..16d0688 100644 --- a/luni/src/main/java/java/nio/ByteBufferAsCharBuffer.java +++ b/luni/src/main/java/java/nio/ByteBufferAsCharBuffer.java @@ -176,8 +176,7 @@ final class ByteBufferAsCharBuffer extends CharBuffer { return result; } - @Override - public CharSequence subSequence(int start, int end) { + @Override public CharBuffer subSequence(int start, int end) { checkStartEndRemaining(start, end); CharBuffer result = duplicate(); result.limit(position + end); diff --git a/luni/src/main/java/java/nio/CharArrayBuffer.java b/luni/src/main/java/java/nio/CharArrayBuffer.java index 43a75a6..245a799 100644 --- a/luni/src/main/java/java/nio/CharArrayBuffer.java +++ b/luni/src/main/java/java/nio/CharArrayBuffer.java @@ -124,7 +124,7 @@ final class CharArrayBuffer extends CharBuffer { return ByteOrder.nativeOrder(); } - @Override public final CharSequence subSequence(int start, int end) { + @Override public final CharBuffer subSequence(int start, int end) { checkStartEndRemaining(start, end); CharBuffer result = duplicate(); result.limit(position + end); diff --git a/luni/src/main/java/java/nio/CharBuffer.java b/luni/src/main/java/java/nio/CharBuffer.java index 5c6f0fc..57070a0 100644 --- a/luni/src/main/java/java/nio/CharBuffer.java +++ b/luni/src/main/java/java/nio/CharBuffer.java @@ -632,7 +632,7 @@ public abstract class CharBuffer extends Buffer implements * @exception IndexOutOfBoundsException * if either {@code start} or {@code end} is invalid. */ - public abstract CharSequence subSequence(int start, int end); + public abstract CharBuffer subSequence(int start, int end); /** * Returns a string representing the current remaining chars of this buffer. diff --git a/luni/src/main/java/java/nio/CharSequenceAdapter.java b/luni/src/main/java/java/nio/CharSequenceAdapter.java index 12bac31..f686827 100644 --- a/luni/src/main/java/java/nio/CharSequenceAdapter.java +++ b/luni/src/main/java/java/nio/CharSequenceAdapter.java @@ -139,8 +139,7 @@ final class CharSequenceAdapter extends CharBuffer { return new CharSequenceAdapter(sequence.subSequence(position, limit)); } - @Override - public CharSequence subSequence(int start, int end) { + @Override public CharBuffer subSequence(int start, int end) { checkStartEndRemaining(start, end); CharSequenceAdapter result = copy(this); result.position = position + start; |