JDK-8226203 : (bf) MappedByteBuffer.force method may have no effect on implementation specific map modes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 13
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-06-16
  • Updated: 2019-07-17
  • Resolved: 2019-06-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13 JDK 14
13 b27Fixed 14Fixed
Related Reports
CSR :  
Relates :  
Description
The force methods defined by MappedByteBuffer have the following statement:

"If this buffer was not mapped in read/write mode (FileChannel.MapMode.READ_WRITE) then invoking this method has no effect."

This wording needs to be changed to take account of possible implementation specific map modes (see JDK-8221397), maybe something like:

"This method has no effect for buffers mapped in read-only or private mapping modes. It may also have no effect for other implementation specific map modes."