8219014: (bf) Add absolute bulk put methods which accept a source Buffer
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Feb 7 17:14:27 UTC 2020
> On Feb 7, 2020, at 9:02 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>
>> On Feb 7, 2020, at 8:56 AM, Daniel Fuchs <daniel.fuchs at oracle.com <mailto:daniel.fuchs at oracle.com>> wrote:
>>
>> [...] If the source buffer is this buffer and
>> 1139 * the source and target intervals overlap, then the buffer elements in the
>> 1140 * target range will be overwritten by those in the source range of the
>> 1141 * same buffer which could lead to unexpected results.
>>
>> I wonder if the text should be a bit more generic here - as I suspect
>> it's also true if the source buffer is a *view* of the destination
>> buffer - that is - if the backend storage is the same for both buffers?
>
> If it is a view then it should be either a read-only buffer of the same type as the target, or a buffer of a different type in which case it would cause a compilation error. So I don’t know about that this verbiage change would be called for, unless I am missing something.
Well actually maybe “if the source buffer is this buffer or a read-only view of this buffer” would be better after all.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200207/7d43df8d/attachment.htm>
More information about the nio-dev
mailing list