RFR: 8263742: (bf) MappedByteBuffer.force() should use the capacity as its upper bound
Brian Burkhalter
bpb at openjdk.java.net
Thu Mar 18 17:31:41 UTC 2021
On Thu, 18 Mar 2021 08:28:11 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Prior to JDK 15, the method `java.nio.MappedByteBuffer.force()` wrote back the entire contents of the buffer, i.e., the half-open range `[0,capacity())`. In JDK 15 the upper bound of the write-back changed from `capacity()` to `limit()`. The change was inadvertent through a chain of fixes outlined in the description of the associated issue. This request is to change back to the previous behavior and use the capacity instead of the limit as the upper bound of the write-back.
>
> Marked as reviewed by alanb (Reviewer).
CSR filed: https://bugs.openjdk.java.net/browse/JDK-8263826
-------------
PR: https://git.openjdk.java.net/jdk/pull/3052
More information about the nio-dev
mailing list