Commits

Anonymous committed cf353b7 Merge

Merge "Fix CharBuffer.subSequence return type."

Comments (0)

Files changed (4)

luni/src/main/java/java/nio/ByteBufferAsCharBuffer.java

         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);

luni/src/main/java/java/nio/CharArrayBuffer.java

     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);

luni/src/main/java/java/nio/CharBuffer.java

      * @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.

luni/src/main/java/java/nio/CharSequenceAdapter.java

         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;