RFR(S): 8151233: Unify CopySwap and CopyMemory tests

David Holmes david.holmes at oracle.com
Tue Mar 15 00:26:13 UTC 2016


Hi Mikael,

On 15/03/2016 8:47 AM, Mikael Vidstedt wrote:
>
> Please review the below change.
>
> When doing the clean up of Unsafe I cheated and made a copy of the
> CopySwap test (used to test U.copySwapMemory) for testing U.copyMemory.
> Much of the code is the same, or at least similar enough, that
> duplication is unfortunate. This change moves the common code to a
> helper file CopyCommon.java, and makes both test files use that.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8151233
> Webrev:
> http://cr.openjdk.java.net/~mikael/webrevs/8151233/webrev.00/webrev/

Is it worth using CopyCommon as a base class and also sharing the UNSAFE 
mechanics?

Otherwise the refactoring seems okay.

Thanks,
David

> Cheers,
> Mikael
>


More information about the jdk9-dev mailing list