src/java.base/share/classes/sun/reflect/UnsafeStaticFieldAccessorImpl.java

Print this page
rev 12972 : 8140606: Update library code to use internal Unsafe
Reviewed-by: duke

*** 26,38 **** package sun.reflect; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessController; ! import sun.misc.Unsafe; ! /** Base class for sun.misc.Unsafe-based FieldAccessors for static fields. The observation is that there are only nine types of fields from the standpoint of reflection code: the eight primitive types and Object. Using class Unsafe instead of generated bytecodes saves memory and loading time for the dynamically-generated FieldAccessors. */ --- 26,38 ---- package sun.reflect; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessController; ! import jdk.internal.misc.Unsafe; ! /** Base class for jdk.internal.misc.Unsafe-based FieldAccessors for static fields. The observation is that there are only nine types of fields from the standpoint of reflection code: the eight primitive types and Object. Using class Unsafe instead of generated bytecodes saves memory and loading time for the dynamically-generated FieldAccessors. */