8219014: (bf) Add absolute bulk put methods which accept a source Buffer
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Jun 26 00:42:36 UTC 2020
Reviving [1] from April.
> On Apr 1, 2020, at 8:57 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>
>> Hmm. This part
>>
>> + * of both buffers are unchanged. If the source buffer and this buffer share
>> + * the same backing storage and the source and destination ranges overlap,
>> + * then the transfer is performed as if the elements at positions
>>
>> still references “backing storage”? Should it say “backing array”
>> instead?
>>
>> I don't think you can make such a promise for direct buffers.
>
> I think the fallback code that does put(j, get(i)) instead of using arraycopy() or Unsafe needs to be checked for this, but the latter two approaches insofar as we know will handle overlaps.
If we are interested in resolving [2], then it is much easier after the fix for [3]. A possible change is [4]. If this seems reasonable then testing will be added and a CSR filed; if not, then perhaps withdraw the issue.
Thanks,
Brian
[1] http://mail.openjdk.java.net/pipermail/nio-dev/2020-April/007154.html
[2] https://bugs.openjdk.java.net/browse/JDK-8219014
[3] https://bugs.openjdk.java.net/browse/JDK-8245121
[4] http://cr.openjdk.java.net/~bpb/8219014/webrev.02/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200625/1b9b5741/attachment.htm>
More information about the nio-dev
mailing list