Summary
-------
Update MappedByteBuffer.force javadoc to encompass implementtaion-specific map modes
Problem
-------
JDK-8221397 allowed for a MappedByteBuffer to be mapped using an implementation-specific map mode. The javadoc for force was not updated to explain that a request may complete with no effect in such a case.
Solution
--------
Update the javadoc to include this outcome.
Specification
-------------
@@ -232,13 +232,13 @@
* invoked, will have been written to that device.
*
* <p> If the file does not reside on a local device then no such guarantee
* is made.
*
- * <p> If this buffer was not mapped in read/write mode ({@link
- * java.nio.channels.FileChannel.MapMode#READ_WRITE}) then invoking this
- * method has no effect. </p>
+ * <p> 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. </p>
*
* @return This buffer
*/
public final MappedByteBuffer force() {
if (fd == null) {
@@ -267,13 +267,13 @@
* are transferred in their entirety.
*
* <p> If the file does not reside on a local device then no such
* guarantee is made.
*
- * <p> If this buffer was not mapped in read/write mode ({@link
- * java.nio.channels.FileChannel.MapMode#READ_WRITE}) then
- * invoking this method has no effect. </p>
+ * <p> 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. </p>
*
* @param index
* The index of the first byte in the buffer region that is
* to be written back to storage; must be non-negative
* and less than limit()