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:
Michael Koch
2003-09-19 07:24:59 +00:00
committed by Michael Koch
parent 04b67900da
commit 65f070242b
3 changed files with 13 additions and 8 deletions
+6 -6
View File
@@ -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;
}
/**
-2
View File
@@ -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;