mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8194676: NullPointerException is thrown if ipaddress is not set
Reviewed-by: chegar, rriggs
This commit is contained in:
parent
7e5577a6c1
commit
78de84bc1e
2 changed files with 97 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -595,7 +595,7 @@ class Inet6Address extends InetAddress {
|
|||
}
|
||||
|
||||
ObjectInputStream.GetField gf = s.readFields();
|
||||
byte[] ipaddress = (byte[])gf.get("ipaddress", null);
|
||||
byte[] ipaddress = (byte[])gf.get("ipaddress", new byte[0]);
|
||||
int scope_id = gf.get("scope_id", -1);
|
||||
boolean scope_id_set = gf.get("scope_id_set", false);
|
||||
boolean scope_ifname_set = gf.get("scope_ifname_set", false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue