src/java.base/share/classes/java/net/Inet6Address.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54206 003cc64366da
child 58679 9c3209ff7550
--- a/src/java.base/share/classes/java/net/Inet6Address.java	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/classes/java/net/Inet6Address.java	Thu Oct 17 20:53:35 2019 +0100
@@ -176,11 +176,6 @@
 class Inet6Address extends InetAddress {
     static final int INADDRSZ = 16;
 
-    /*
-     * cached scope_id - for link-local address use only.
-     */
-    private transient int cached_scope_id;  // 0
-
     private class Inet6AddressHolder {
 
         private Inet6AddressHolder() {
@@ -368,6 +363,7 @@
 
     private final transient Inet6AddressHolder holder6;
 
+    @java.io.Serial
     private static final long serialVersionUID = 6880410070516793377L;
 
     // Perform native initialization
@@ -567,7 +563,7 @@
      * @serialField scope_ifname_set boolean
      * @serialField ifname String
      */
-
+    @java.io.Serial
     private static final ObjectStreamField[] serialPersistentFields = {
          new ObjectStreamField("ipaddress", byte[].class),
          new ObjectStreamField("scope_id", int.class),
@@ -586,6 +582,7 @@
      * including the scope information, only if the
      * scoped interface name is valid on this system
      */
+    @java.io.Serial
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
         NetworkInterface scope_ifname = null;
@@ -649,6 +646,7 @@
      * scope_ifname field as a String, rather than a NetworkInterface
      * which is not serializable
      */
+    @java.io.Serial
     private synchronized void writeObject(ObjectOutputStream s)
         throws IOException
     {