DatagramSocket.java (getLocalAddress): Renamed result variable to localAddr.
2003-09-19 Michael Koch <konqueror@gmx.de> * java/net/DatagramSocket.java (getLocalAddress): Renamed result variable to localAddr. * java/net/MulticastSocket.java: No need to import gnu.java.net.PlainDatagramSocketImpl. From-SVN: r71561
This commit is contained in:
committed by
Michael Koch
parent
04b67900da
commit
65f070242b
@@ -266,26 +266,26 @@ public class DatagramSocket
|
||||
|| closed)
|
||||
return null;
|
||||
|
||||
InetAddress result;
|
||||
InetAddress localAddr;
|
||||
|
||||
try
|
||||
{
|
||||
result = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR);
|
||||
localAddr = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR);
|
||||
|
||||
SecurityManager s = System.getSecurityManager();
|
||||
if (s != null)
|
||||
s.checkConnect (result.getHostName(), -1);
|
||||
s.checkConnect (localAddr.getHostName(), -1);
|
||||
}
|
||||
catch (SecurityException e)
|
||||
{
|
||||
result = InetAddress.ANY_IF;
|
||||
localAddr = InetAddress.ANY_IF;
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
result = InetAddress.ANY_IF;
|
||||
return null;
|
||||
}
|
||||
|
||||
return result;
|
||||
return localAddr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,10 +36,8 @@ this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
|
||||
package java.net;
|
||||
|
||||
import gnu.java.net.PlainDatagramSocketImpl;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user