InetAddress.java (InetAddress): Make a private copy of the address.

2005-02-02  David Daney  <ddaney@avtrex.com>

	* java/net/InetAddress.java (InetAddress): Make a private copy of
	the address.
	* java/net/Inet4Address.java (getAddress): Return a copy of the
	address.
	* java/net/Inet6Address.java (Inet6Address): Use private copy of
	the address
	(getAddress): Return a copy of the address.
	(equals): Rewrote.

From-SVN: r94664
This commit is contained in:
David Daney 2005-02-03 17:44:20 +00:00 committed by David Daney
parent 773af5d0df
commit 4dc2f71b90
4 changed files with 20 additions and 7 deletions

View file

@ -207,7 +207,7 @@ public final class Inet4Address extends InetAddress
*/
public byte[] getAddress()
{
return addr;
return (byte[]) addr.clone();
}
/**