src/java.base/share/classes/java/net/Inet6Address.java
changeset 48666 d626620a1844
parent 47216 71c04702a3d5
child 52220 9c260a6b6471
equal deleted inserted replaced
48665:257d7610663f 48666:d626620a1844
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   593         if (getClass().getClassLoader() != null) {
   593         if (getClass().getClassLoader() != null) {
   594             throw new SecurityException ("invalid address type");
   594             throw new SecurityException ("invalid address type");
   595         }
   595         }
   596 
   596 
   597         ObjectInputStream.GetField gf = s.readFields();
   597         ObjectInputStream.GetField gf = s.readFields();
   598         byte[] ipaddress = (byte[])gf.get("ipaddress", null);
   598         byte[] ipaddress = (byte[])gf.get("ipaddress", new byte[0]);
   599         int scope_id = gf.get("scope_id", -1);
   599         int scope_id = gf.get("scope_id", -1);
   600         boolean scope_id_set = gf.get("scope_id_set", false);
   600         boolean scope_id_set = gf.get("scope_id_set", false);
   601         boolean scope_ifname_set = gf.get("scope_ifname_set", false);
   601         boolean scope_ifname_set = gf.get("scope_ifname_set", false);
   602         String ifname = (String)gf.get("ifname", null);
   602         String ifname = (String)gf.get("ifname", null);
   603 
   603