RFR: 8265699: (bf) Scopes passed to ScopedMemoryAccess.copy[Swap]Memory in incorrect order

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Apr 21 20:13:33 UTC 2021


On Wed, 21 Apr 2021 19:36:57 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Please consider this request to correct what appear to be `jdk.internal.misc.ScopedMemoryAccess$Scope`s passed in incorrect order to the `copyMemory()` and `copySwapMemory()` methods of `jdk.internal.misc.ScopedMemoryAccess` in some of the `java.nio.Buffer` bulk transfer methods.

Looks good except for one edit

src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 551:

> 549:         int rem = (pos <= lim ? lim - pos : 0);
> 550:         try {
> 551:             SCOPED_MEMORY_ACCESS.copyMemory(scope(), scope(), null,

Is this deliberate? same strange to use same scope for both address and target?

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

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


More information about the nio-dev mailing list