src/java.base/share/classes/java/net/InetAddress.java
Print this page
rev 12972 : 8140606: Update library code to use internal Unsafe
Reviewed-by: duke
*** 1491,1505 ****
throw new SecurityException ("invalid address type");
}
}
private static final long FIELDS_OFFSET;
! private static final sun.misc.Unsafe UNSAFE;
static {
try {
! sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
FIELDS_OFFSET = unsafe.objectFieldOffset(
InetAddress.class.getDeclaredField("holder")
);
UNSAFE = unsafe;
} catch (ReflectiveOperationException e) {
--- 1491,1505 ----
throw new SecurityException ("invalid address type");
}
}
private static final long FIELDS_OFFSET;
! private static final jdk.internal.misc.Unsafe UNSAFE;
static {
try {
! jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe();
FIELDS_OFFSET = unsafe.objectFieldOffset(
InetAddress.class.getDeclaredField("holder")
);
UNSAFE = unsafe;
} catch (ReflectiveOperationException e) {