+2003-06-18 Tom Tromey <tromey@redhat.com>
+
+ * java/net/Inet6Address.java (isAnyLocalAddress): Don't use "=="
+ on arrays.
+ (isLoopbackAddress): Likewise.
+ * java/net/Inet4Address.java (isAnyLocalAddress): Don't use "=="
+ on arrays.
+
2003-06-18 Matt Kraai <kraai@alumni.cmu.edu>
* java/lang/natVMSecurityManager.cc (getClassContext):
/* Inet4Address.java
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.io.IOException;
import java.io.ObjectStreamException;
+import java.util.Arrays;
/**
* @author Michael Koch
{
byte[] anylocal = { 0, 0, 0, 0 };
- return addr == anylocal;
+ return Arrays.equals(addr, anylocal);
}
/**
/* Inet6Address.java
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package java.net;
import java.io.IOException;
+import java.util.Arrays;
/**
* @author Michael Koch
byte[] anylocal = { 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 };
- return ipaddress == anylocal;
+ return Arrays.equals(ipaddress, anylocal);
}
/**
byte[] loopback = { 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1 };
- return ipaddress == loopback;
+ return Arrays.equals(ipaddress, loopback);
}
/**