|
Relates :
|
A long standing implementation detail is that direct ByteBuffers extend MappedByteBuffer. Now consider:
if (bb instance MappedByteBuffer) {
((MappedByteBuffer)bb).force();
}
This throws UOE, as does isLoaded and the other methods defined by MappedByteBuffer.
A simple solution may be force/load/etc. to be no-ops when invoked without a backing file.