--- old/src/java.base/share/classes/java/net/InetAddress.java 2019-08-27 17:27:58.806324386 -0700 +++ new/src/java.base/share/classes/java/net/InetAddress.java 2019-08-27 17:27:58.618324386 -0700 @@ -299,6 +299,7 @@ private transient String canonicalHostName = null; /** use serialVersionUID from JDK 1.0.2 for interoperability */ + @java.io.Serial private static final long serialVersionUID = 3286316764910316507L; /* @@ -353,6 +354,7 @@ * @throws ObjectStreamException if a new object replacing this * object could not be created */ + @java.io.Serial private Object readResolve() throws ObjectStreamException { // will replace the deserialized 'this' object return new Inet4Address(holder().getHostName(), holder().getAddress()); @@ -1687,6 +1689,7 @@ return (InetAddressImpl) impl; } + @java.io.Serial private void readObjectNoData () { if (getClass().getClassLoader() != null) { throw new SecurityException ("invalid address type"); @@ -1698,6 +1701,7 @@ private static final long FIELDS_OFFSET = UNSAFE.objectFieldOffset(InetAddress.class, "holder"); + @java.io.Serial private void readObject (ObjectInputStream s) throws IOException, ClassNotFoundException { if (getClass().getClassLoader() != null) { @@ -1721,12 +1725,14 @@ * @serialField address int * @serialField family int */ + @java.io.Serial private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("hostName", String.class), new ObjectStreamField("address", int.class), new ObjectStreamField("family", int.class), }; + @java.io.Serial private void writeObject (ObjectOutputStream s) throws IOException { if (getClass().getClassLoader() != null) {