8226203: MappedByteBuffer.force method may have no effect on implementation specific map modes
authoradinn
Fri, 21 Jun 2019 15:16:03 +0100
changeset 55466 a6411f1e63f3
parent 55465 68ef70c9a921
child 55467 e9d4e0a9c8c7
8226203: MappedByteBuffer.force method may have no effect on implementation specific map modes Summary: Fix comment for MappedByteBuffer force methods Reviewed-by: alanb
src/java.base/share/classes/java/nio/MappedByteBuffer.java
--- a/src/java.base/share/classes/java/nio/MappedByteBuffer.java	Fri Jun 21 06:33:55 2019 -0700
+++ b/src/java.base/share/classes/java/nio/MappedByteBuffer.java	Fri Jun 21 15:16:03 2019 +0100
@@ -235,8 +235,11 @@
      * 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>
+     * java.nio.channels.FileChannel.MapMode#READ_WRITE}) then
+     * invoking this method may have no effect. In particular, the
+     * method has no effect for buffers mapped in read-only or private
+     * mapping modes. This method may or may not have an effect for
+     * implementation-specific mapping modes. </p>
      *
      * @return  This buffer
      */
@@ -271,7 +274,10 @@
      *
      * <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>
+     * invoking this method may have no effect. In particular, the
+     * method has no effect for buffers mapped in read-only or private
+     * mapping modes. This method may or may not have an effect for
+     * implementation-specific mapping modes. </p>
      *
      * @param index
      *        The index of the first byte in the buffer region that is