OpenJDK / amber / amber
changeset 57090:a6411f1e63f3
8226203: MappedByteBuffer.force method may have no effect on implementation specific map modes
Summary: Fix comment for MappedByteBuffer force methods
Reviewed-by: alanb
author | adinn |
---|---|
date | Fri, 21 Jun 2019 15:16:03 +0100 |
parents | 68ef70c9a921 |
children | e9d4e0a9c8c7 |
files | src/java.base/share/classes/java/nio/MappedByteBuffer.java |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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