RFR [9] 8140606: Update library code to use internal Unsafe

Chris Hegarty chris.hegarty at oracle.com
Thu Oct 29 14:12:10 UTC 2015

On 28 Oct 2015, at 21:42, Martin Buchholz <martinrb at google.com> wrote:

> This will cause jsr166 CVS code to no longer be able to run on jdk8, as it does today.  We will probably need to fork soon anyways due to Paul's VarHandle code, but we had not expected it to be necessary before then.  Is there any easy way for jsr166 CVS src/main to remain "portable" for a while longer?  Alternatively, what can we do to continue using "good old sun.misc.Unsafe" in jsr166 CVS?

Right, for now I think you can continue to use sun.misc.Unsafe,
until VarHandles arrive. Since the major 166 sync is done, the 
amount of change in this area should be small. I can help out
with incoming changes also, until you fork.


> On Wed, Oct 28, 2015 at 12:55 PM, Chris Hegarty <chris.hegarty at oracle.com> wrote:
> Following on from 8139891 "Prepare Unsafe for true encapsulation” [1],
> the JDK library code should use the internal Unsafe class, and not
> sun.misc.Unsafe.
> http://cr.openjdk.java.net/~chegar/8140606/00/
> This will be pushed to jdk9/dev once 8139891 makes its way from
> hs-rt.
> -Chris.
> [1] https://bugs.openjdk.java.net/browse/JDK-8139891

More information about the core-libs-dev mailing list