< prev index next >
src/java.base/share/classes/java/net/Inet6Address.java
Print this page
*** 361,370 ****
--- 361,371 ----
}
}
private final transient Inet6AddressHolder holder6;
+ @java.io.Serial
private static final long serialVersionUID = 6880410070516793377L;
// Perform native initialization
static { init(); }
*** 560,570 ****
* @serialField scope_id int
* @serialField scope_id_set boolean
* @serialField scope_ifname_set boolean
* @serialField ifname String
*/
!
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),
--- 561,571 ----
* @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,588 ****
--- 580,590 ----
/**
* 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,651 ****
--- 644,654 ----
/**
* 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 >