Review Request: JDK-8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference

Mandy Chung mandy.chung at oracle.com
Tue Oct 16 16:08:27 UTC 2018


Webrev:
http://cr.openjdk.java.net/~mchung/jdk12/webrevs/8207146/webrev.00/

Unsafe::getObject returns a reference to an object. Similarly
Unsafe::putObject sets a reference in the given base+offset.
This patch proposes to rename Unsafe xxxObject to xxxReference
that will make the xxxReference API very clear that these
are getters/setters for a reference (instance of object class)
and ready for adding xxxValue in the futurefor values.
Note that this renaming only applies to jdk.internal.misc.Unsafe
but not sun.misc.Unsafe.  So no impact to existing libraries
that depends on sun.misc.Unsafe in jdk.unsupported module.

I ran jdk_core, core_tools, langtools and nashorn tier1-3,
hotspot_runtime, hotspot_compiler test groups.

thanks
Mandy


More information about the core-libs-dev mailing list