diff --git a/luni/src/main/java/java/nio/ByteBuffer.java b/luni/src/main/java/java/nio/ByteBuffer.java index e2ad60345c..715769dc33 100644 --- a/luni/src/main/java/java/nio/ByteBuffer.java +++ b/luni/src/main/java/java/nio/ByteBuffer.java @@ -255,70 +255,6 @@ public static ByteBuffer wrap(byte[] array, int start, int byteCount) { */ public abstract ShortBuffer asShortBuffer(); - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ByteBuffer rewind() { - super.rewind(); - return this; - } /** * Compacts this byte buffer. diff --git a/luni/src/main/java/java/nio/CharBuffer.java b/luni/src/main/java/java/nio/CharBuffer.java index 44bbfa96c6..29da062b97 100644 --- a/luni/src/main/java/java/nio/CharBuffer.java +++ b/luni/src/main/java/java/nio/CharBuffer.java @@ -175,71 +175,6 @@ public final char charAt(int index) { return get(position + index); } - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final CharBuffer rewind() { - super.rewind(); - return this; - } - /** * Compacts this char buffer. *
diff --git a/luni/src/main/java/java/nio/DoubleBuffer.java b/luni/src/main/java/java/nio/DoubleBuffer.java index f7dfb3daf8..b586f83481 100644 --- a/luni/src/main/java/java/nio/DoubleBuffer.java +++ b/luni/src/main/java/java/nio/DoubleBuffer.java @@ -119,71 +119,6 @@ public final int arrayOffset() { */ public abstract DoubleBuffer asReadOnlyBuffer(); - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final DoubleBuffer rewind() { - super.rewind(); - return this; - } - /** * Compacts this double buffer. *
diff --git a/luni/src/main/java/java/nio/FloatBuffer.java b/luni/src/main/java/java/nio/FloatBuffer.java index 2093b8e427..90a632f8ba 100644 --- a/luni/src/main/java/java/nio/FloatBuffer.java +++ b/luni/src/main/java/java/nio/FloatBuffer.java @@ -120,71 +120,6 @@ public final int arrayOffset() { */ public abstract FloatBuffer asReadOnlyBuffer(); - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final FloatBuffer rewind() { - super.rewind(); - return this; - } - /** * Compacts this float buffer. *
diff --git a/luni/src/main/java/java/nio/IntBuffer.java b/luni/src/main/java/java/nio/IntBuffer.java index 4345febde1..165bb0442c 100644 --- a/luni/src/main/java/java/nio/IntBuffer.java +++ b/luni/src/main/java/java/nio/IntBuffer.java @@ -116,71 +116,6 @@ public final int arrayOffset() { */ public abstract IntBuffer asReadOnlyBuffer(); - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final IntBuffer rewind() { - super.rewind(); - return this; - } - /** * Compacts this int buffer. *
diff --git a/luni/src/main/java/java/nio/LongBuffer.java b/luni/src/main/java/java/nio/LongBuffer.java index ab14f6e203..b89cc7b233 100644 --- a/luni/src/main/java/java/nio/LongBuffer.java +++ b/luni/src/main/java/java/nio/LongBuffer.java @@ -118,71 +118,6 @@ public final int arrayOffset() { */ public abstract LongBuffer asReadOnlyBuffer(); - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final LongBuffer rewind() { - super.rewind(); - return this; - } - /** * Compacts this long buffer. *
diff --git a/luni/src/main/java/java/nio/MappedByteBuffer.java b/luni/src/main/java/java/nio/MappedByteBuffer.java index 43a9026456..ce19c0cba9 100644 --- a/luni/src/main/java/java/nio/MappedByteBuffer.java +++ b/luni/src/main/java/java/nio/MappedByteBuffer.java @@ -123,76 +123,4 @@ private void checkIsMapped() { throw new UnsupportedOperationException(); } } - - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ -// @DesugarSupportedApiHelper - @Override - public final MappedByteBuffer rewind() { - super.rewind(); - return this; - } } diff --git a/luni/src/main/java/java/nio/ShortBuffer.java b/luni/src/main/java/java/nio/ShortBuffer.java index 135362632a..4cd7e8e2a1 100644 --- a/luni/src/main/java/java/nio/ShortBuffer.java +++ b/luni/src/main/java/java/nio/ShortBuffer.java @@ -118,71 +118,6 @@ public final int arrayOffset() { */ public abstract ShortBuffer asReadOnlyBuffer(); - // -- Covariant return type overrides - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer position(int newPosition) { - super.position(newPosition); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer limit(int newLimit) { - super.limit(newLimit); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer mark() { - super.mark(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer reset() { - super.reset(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer clear() { - super.clear(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer flip() { - super.flip(); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public final ShortBuffer rewind() { - super.rewind(); - return this; - } - /** * Compacts this short buffer. *