6539707: (fc) MappedByteBuffer.force() method throws an IOException in a very simple test

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2021-03-15 17:24:24 +00:00
parent 189289d9c7
commit 46d78f0d24
5 changed files with 97 additions and 5 deletions

View file

@ -26,6 +26,7 @@
package java.nio;
import java.io.FileDescriptor;
import java.io.UncheckedIOException;
import java.lang.ref.Reference;
import java.util.Objects;
@ -221,6 +222,10 @@ public abstract class MappedByteBuffer
* mapping modes. This method may or may not have an effect for
* implementation-specific mapping modes. </p>
*
* @throws UncheckedIOException
* If an I/O error occurs writing the buffer's content to the
* storage device containing the mapped file
*
* @return This buffer
*/
public final MappedByteBuffer force() {
@ -272,6 +277,10 @@ public abstract class MappedByteBuffer
* if the preconditions on the index and length do not
* hold.
*
* @throws UncheckedIOException
* If an I/O error occurs writing the buffer's content to the
* storage device containing the mapped file
*
* @return This buffer
*
* @since 13