[patch] Re: Correction to InetAddress bug?

Bryce McKinlay bryce@albatross.co.nz
Tue Jul 27 00:47:00 GMT 1999


Bryce McKinlay wrote:
> Warren Levy wrote:
>> > Hmm, the problem seems to be that the InetAddress that is instantiated
> > has a null address value. I'll have to look deeper to decide on the
> > right fix (something might be relying on address being null at times,
> > though I hope not).
>> Err, well... here is a suggested fix ;-)
>> [WARNING: DatagramSocketImpl changes not tested.]

Oops, I forgot to include this file in the patch:
Index: libjava/java/net/DatagramSocket.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/net/DatagramSocket.java,v
retrieving revision 1.4
diff -u -r1.4 DatagramSocket.java
--- DatagramSocket.java 1999年07月20日 20:30:42 1.4
+++ DatagramSocket.java 1999年07月27日 07:45:37
@@ -28,12 +28,12 @@
 public DatagramSocket() throws SocketException
 {
- this(0, null);
+ this(0, ServerSocket.IF_ANY);
 }
 public DatagramSocket(int port) throws SocketException
 {
- this(port, null);
+ this(port, ServerSocket.IF_ANY);
 }
 public DatagramSocket(int port, InetAddress laddr) throws SocketException


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /