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:
parent
773af5d0df
commit
4dc2f71b90
4 changed files with 20 additions and 7 deletions
|
@ -207,7 +207,7 @@ public final class Inet4Address extends InetAddress
|
|||
*/
|
||||
public byte[] getAddress()
|
||||
{
|
||||
return addr;
|
||||
return (byte[]) addr.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue