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

Brian Burkhalter bpb at openjdk.java.net
Mon Mar 15 17:27:11 UTC 2021


On Fri, 19 Feb 2021 00:34:24 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> This change proposes to increase the number of retries of `FlushViewOfFile` in the Windows native implementation of `MappedByteBuffer.force()`, and to catch any exception thrown by the native `force()` and rethrow an `UncheckedIOException` with cause set to the intercepted exception. A sentence is added to the specification of `MappedByteBuffer.force()` regarding unspecified errors. The test from the issue description is revised to fail if `force()` throws an exception which is not an `UncheckedIOException`, or if it is an `UncheckedIOException` whose message indicates it was thrown by the Windows native implementation of `force()`.

This pull request has now been integrated.

Changeset: 46d78f0d
Author:    Brian Burkhalter <bpb at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/46d78f0d
Stats:     97 lines in 5 files changed: 92 ins; 0 del; 5 mod

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

Reviewed-by: alanb

-------------

PR: https://git.openjdk.java.net/jdk/pull/2636


More information about the nio-dev mailing list