--- old/src/java.base/share/classes/java/nio/MappedByteBuffer.java 2014-09-16 22:40:25.841782579 +0100 +++ new/src/java.base/share/classes/java/nio/MappedByteBuffer.java 2014-09-16 22:40:25.729782581 +0100 @@ -208,4 +208,69 @@ private native boolean isLoaded0(long address, long length, int pageCount); private native void load0(long address, long length); private native void force0(FileDescriptor fd, long address, long length); + + // -- Covariant return type overrides + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer position(int newPosition) { + super.position(newPosition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer limit(int newLimit) { + super.limit(newLimit); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer mark() { + super.mark(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer reset() { + super.reset(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer clear() { + super.clear(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer flip() { + super.flip(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public final MappedByteBuffer rewind() { + super.rewind(); + return this; + } }