< prev index next >

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

Print this page

        

@@ -361,10 +361,11 @@
         }
     }
 
     private final transient Inet6AddressHolder holder6;
 
+    @java.io.Serial
     private static final long serialVersionUID = 6880410070516793377L;
 
     // Perform native initialization
     static { init(); }
 

@@ -560,11 +561,11 @@
      * @serialField scope_id int
      * @serialField scope_id_set boolean
      * @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),
          new ObjectStreamField("scope_id_set", boolean.class),
          new ObjectStreamField("scope_ifname_set", boolean.class),

@@ -579,10 +580,11 @@
     /**
      * restore the state of this object from stream
      * 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;
 
         if (getClass().getClassLoader() != null) {

@@ -642,10 +644,11 @@
     /**
      * default behavior is overridden in order to write the
      * 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
     {
             String ifname = null;
 
< prev index next >