[8u] RFR 8141491: Unaligned memory access in Bits.c
Alan Bateman
Alan.Bateman at oracle.com
Thu Nov 8 07:57:18 UTC 2018
On 07/11/2018 21:34, Mikael Vidstedt wrote:
>
> Looks good. A few comments:
>
> * src/share/classes/sun/misc/Unsafe.java
>
> javadoc for copySwapMemory says “@since 9” which seems confusing at best.
>
> The original change in jdk9 only added the new methods to the jdk
> internal Unsafe, while this back port adds them to sun.misc.Unsafe.
> I’ll leave it for somebody else to comment on the appropriateness of that.
>
Right, I think the changes will need to be refactored to avoid adding a
public member to sun.misc.Unsafe. If you add it then people will find it
and make use of it and then get annoyed because it doesn't exist in
sun.misc.Unsafe in JDK 9 and newer.
-Alan
More information about the nio-dev
mailing list