src/share/classes/java/net/Inet4AddressImpl.java
Print this page
rev 661 : 8000724: Improve networking serialization
Summary: delegate InetAddress fields to a holder object
Reviewed-by: alanb, chegar, omajid
*** 38,48 ****
private native boolean isReachable0(byte[] addr, int timeout, byte[] ifaddr, int ttl) throws IOException;
public synchronized InetAddress anyLocalAddress() {
if (anyLocalAddress == null) {
anyLocalAddress = new Inet4Address(); // {0x00,0x00,0x00,0x00}
! anyLocalAddress.hostName = "0.0.0.0";
}
return anyLocalAddress;
}
public synchronized InetAddress loopbackAddress() {
--- 38,48 ----
private native boolean isReachable0(byte[] addr, int timeout, byte[] ifaddr, int ttl) throws IOException;
public synchronized InetAddress anyLocalAddress() {
if (anyLocalAddress == null) {
anyLocalAddress = new Inet4Address(); // {0x00,0x00,0x00,0x00}
! anyLocalAddress.holder().hostName = "0.0.0.0";
}
return anyLocalAddress;
}
public synchronized InetAddress loopbackAddress() {