This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.net


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited a patch to trunk for java.net that does two things:

1) it removes an unnneeded include in java/net/Multicast.java.

2) it renames a variable in java.net.DatagramSocket.getLocalAddress() 
to match classpath's implementation better.

Patch attached.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/aq/NWSOgCCdjSDsRAl3oAKCQWSIN/A4iL6t+fdi9jZ4/QaxaiwCffJqP
vWTFZT1ybYwOkZ5i6mVuSmo=
=UR4/
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2157
diff -u -b -B -r1.2157 ChangeLog
--- ChangeLog	18 Sep 2003 22:37:47 -0000	1.2157
+++ ChangeLog	19 Sep 2003 07:22:50 -0000
@@ -1,3 +1,10 @@
+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>
 
 	* java/awt/Toolkit.java (getSystemEventQueue, getSystemEventQueueImpl):
Index: java/net/MulticastSocket.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/MulticastSocket.java,v
retrieving revision 1.22
diff -u -b -B -r1.22 MulticastSocket.java
--- java/net/MulticastSocket.java	10 Sep 2003 17:39:18 -0000	1.22
+++ java/net/MulticastSocket.java	19 Sep 2003 07:22:50 -0000
@@ -36,10 +36,8 @@
 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;
 
Index: java/net/DatagramSocket.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/DatagramSocket.java,v
retrieving revision 1.28
diff -u -b -B -r1.28 DatagramSocket.java
--- java/net/DatagramSocket.java	18 Sep 2003 11:32:46 -0000	1.28
+++ java/net/DatagramSocket.java	19 Sep 2003 07:22:50 -0000
@@ -266,26 +266,26 @@
 	|| 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;
   }
 
   /**

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]