src/java.base/share/classes/java/net/InetSocketAddress.java

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

*** 301,314 **** { throw new InvalidObjectException("Stream data required"); } 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( InetSocketAddress.class.getDeclaredField("holder")); UNSAFE = unsafe; } catch (ReflectiveOperationException e) { throw new Error(e); --- 301,314 ---- { throw new InvalidObjectException("Stream data required"); } 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( InetSocketAddress.class.getDeclaredField("holder")); UNSAFE = unsafe; } catch (ReflectiveOperationException e) { throw new Error(e);