Commit 65f07024 by Michael Koch Committed by Michael Koch

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
parent 04b67900
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.
2003-09-18 Sascha Brawer <brawer@dandelis.ch> 2003-09-18 Sascha Brawer <brawer@dandelis.ch>
* java/awt/Toolkit.java (getSystemEventQueue, getSystemEventQueueImpl): * java/awt/Toolkit.java (getSystemEventQueue, getSystemEventQueueImpl):
......
...@@ -266,26 +266,26 @@ public class DatagramSocket ...@@ -266,26 +266,26 @@ public class DatagramSocket
|| closed) || closed)
return null; return null;
InetAddress result; InetAddress localAddr;
try try
{ {
result = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR); localAddr = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR);
SecurityManager s = System.getSecurityManager(); SecurityManager s = System.getSecurityManager();
if (s != null) if (s != null)
s.checkConnect (result.getHostName(), -1); s.checkConnect (localAddr.getHostName(), -1);
} }
catch (SecurityException e) catch (SecurityException e)
{ {
result = InetAddress.ANY_IF; localAddr = InetAddress.ANY_IF;
} }
catch (SocketException e) 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 ...@@ -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 obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package java.net; package java.net;
import gnu.java.net.PlainDatagramSocketImpl;
import java.io.IOException; import java.io.IOException;
import java.util.Enumeration; import java.util.Enumeration;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment