8242477: (bf) MappedByteBuffer should clarify copying between overlapping mappings

Alan Bateman Alan.Bateman at oracle.com
Fri Apr 10 11:10:31 UTC 2020


On 09/04/2020 23:26, Brian Burkhalter wrote:
> To fix [1] this additional verbiage is proposed for the class 
> specification of MappedByteBuffer:
>
> @@ -58,6 +58,9 @@
>   * avoid the manipulation of a mapped file by this program, or by a
>   * concurrently running program, except to read or write the file's 
> content.
>   *
> + * <p> The result of a bulk copy between two {@code MappedByteBuffer}s is
> + * unspecified if they are mapped from overlapping regions of the 
> same file.
> + *
>   * <p> Mapped byte buffers otherwise behave no differently than 
> ordinary direct
>   * byte buffers. </p>
>
Looks good, I think this is the right place in the class description for 
this.

-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200410/cf626edd/attachment.htm>


More information about the nio-dev mailing list