RFR: 8224974: Implement JEP 352

Alan Bateman Alan.Bateman at oracle.com
Fri Aug 16 10:39:02 UTC 2019

On 15/08/2019 12:53, Andrew Dinn wrote:
> Hi Alan,
> Any further input on this patch forthcoming?
I think the main changes since I looked at it previously have been in 
the tests.

On non-Linux platforms, FileChannel.map should throw UOE when invoked 
with a mode map of READ_ONLY_SYNC or READ_WRITE_SYNC so I think we need 
a test for that.

MapFail seems fragile. If you add @modules java.base/jdk.internal.misc 
to the test description then it could use Unsafe::isWritebackEnabled and 
I think would simplify the test and checks. It would mean it could run 
on all platforms. Also "MapFail" is probably too general a name for a 
test in MBB because its specific to the extended map modes, not a 
general test of map failing.

In passing, MappedByteBuffer load/isLoaded check the fd value before 
isSync, can force() do the same? Also the @return on the private isSync 
method is very wordy and I don't think needs to duplicate the method 


More information about the core-libs-dev mailing list