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

Brian Burkhalter bpb at openjdk.java.net
Wed Feb 24 00:30:05 UTC 2021


> 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()`.

Brian Burkhalter has updated the pull request incrementally with two additional commits since the last revision:

 - 6539707: Fix whitespace error
 - 6539707: Spec force() method of MappedByteBuffer and MappedMemorySegments to throw UncheckedIOException

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2636/files
  - new: https://git.openjdk.java.net/jdk/pull/2636/files/6b048efa..7199392d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2636&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2636&range=00-01

  Stats: 26 lines in 3 files changed: 12 ins; 11 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2636.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2636/head:pull/2636

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


More information about the nio-dev mailing list