8229997: Apply java.io.Serial annotations in java.base

Reviewed-by: alanb, rriggs
This commit is contained in:
Joe Darcy 2019-08-29 16:31:34 -07:00
parent 6d064a747e
commit 9d764ee48e
315 changed files with 880 additions and 254 deletions

View file

@ -363,6 +363,7 @@ class Inet6Address extends InetAddress {
private final transient Inet6AddressHolder holder6;
@java.io.Serial
private static final long serialVersionUID = 6880410070516793377L;
// Perform native initialization
@ -562,7 +563,7 @@ class Inet6Address extends InetAddress {
* @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),
@ -581,6 +582,7 @@ class Inet6Address extends InetAddress {
* 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;
@ -644,6 +646,7 @@ class Inet6Address extends InetAddress {
* 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
{