--- old/src/share/classes/java/nio/MappedByteBuffer.java 2014-04-20 19:40:12.844106066 +0100 +++ new/src/share/classes/java/nio/MappedByteBuffer.java 2014-04-20 19:40:12.748106062 +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 MappedByteBuffer position(int newPosition) { + super.position(newPosition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MappedByteBuffer limit(int newLimit) { + super.limit(newLimit); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MappedByteBuffer mark() { + super.mark(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MappedByteBuffer reset() { + super.reset(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MappedByteBuffer clear() { + super.clear(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MappedByteBuffer flip() { + super.flip(); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MappedByteBuffer rewind() { + super.rewind(); + return this; + } }