[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath

Kaffe CVS cvs-commits at kaffe.org
Tue Feb 24 10:09:02 PST 2004


PatchSet 4458 
Date: 2004/02/24 18:02:27
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath

2004-02-24  Dalibor Topic <robilad at kaffe.org>

        Resynced with GNU Classpath

        2004-02-12  Michael Koch  <konqueror at gmx.de>

        * java/net/Socket.java
        (setTcpNoDelay): Use Boolean.valueOf() instead of creating a new
        Boolean object.
        (setSoLinger): Likewise.
        (setOOBInline): Likewise.
        (setKeepAlive): Likewise.
        (setReuseAddress): Likewise.

        2004-02-06  Mohan Embar  <gnustuff at thisiscool.com>

        * java/net/Socket.java (connect): Don't throw an
        IllegalBlockingModeException if we have a non-blocking
        channel which initiated this connect operation.

Members: 
	ChangeLog:1.2038->1.2039 
	libraries/javalib/java/net/Socket.java:1.29->1.30 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2038 kaffe/ChangeLog:1.2039
--- kaffe/ChangeLog:1.2038	Tue Feb 24 17:53:25 2004
+++ kaffe/ChangeLog	Tue Feb 24 18:02:27 2004
@@ -4,6 +4,26 @@
 
 	2004-02-12  Michael Koch  <konqueror at gmx.de>
 
+        * java/net/Socket.java
+        (setTcpNoDelay): Use Boolean.valueOf() instead of creating a new
+        Boolean object.
+        (setSoLinger): Likewise.
+        (setOOBInline): Likewise.
+        (setKeepAlive): Likewise.
+        (setReuseAddress): Likewise.
+
+	2004-02-06  Mohan Embar  <gnustuff at thisiscool.com>
+
+        * java/net/Socket.java (connect): Don't throw an
+        IllegalBlockingModeException if we have a non-blocking
+        channel which initiated this connect operation.
+ 
+2004-02-24  Dalibor Topic <robilad at kaffe.org>
+
+	Resynced with GNU Classpath
+
+	2004-02-12  Michael Koch  <konqueror at gmx.de>
+
         * java/net/ServerSocket.java
         (setReuseAddress): Use Boolean.valueOf() instead of creating a new
         Boolean object.
Index: kaffe/libraries/javalib/java/net/Socket.java
diff -u kaffe/libraries/javalib/java/net/Socket.java:1.29 kaffe/libraries/javalib/java/net/Socket.java:1.30
--- kaffe/libraries/javalib/java/net/Socket.java:1.29	Sun Dec  7 18:21:12 2003
+++ kaffe/libraries/javalib/java/net/Socket.java	Tue Feb 24 18:02:28 2004
@@ -1,5 +1,6 @@
 /* Socket.java -- Client socket implementation
-   Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004
+   Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -420,8 +421,13 @@
     if (! (endpoint instanceof InetSocketAddress))
       throw new IllegalArgumentException("unsupported address type");
 
+    // The Sun spec says that if we have an associated channel and
+    // it is in non-blocking mode, we throw an IllegalBlockingModeException.
+    // However, in our implementation if the channel itself initiated this
+    // operation, then we must honor it regardless of its blocking mode.
     if (getChannel() != null
-        && !getChannel().isBlocking ())
+        && !getChannel().isBlocking ()
+        && !((PlainSocketImpl) getImpl()).isInChannelOperation())
       throw new IllegalBlockingModeException ();
   
     if (!isBound ())
@@ -651,7 +657,7 @@
     if (isClosed())
       throw new SocketException("socket is closed");
     
-    getImpl().setOption(SocketOptions.TCP_NODELAY, new Boolean(on));
+    getImpl().setOption(SocketOptions.TCP_NODELAY, Boolean.valueOf(on));
   }
 
   /**
@@ -713,7 +719,7 @@
       }
     else
       {
-        getImpl().setOption(SocketOptions.SO_LINGER, new Boolean(false));
+        getImpl().setOption(SocketOptions.SO_LINGER, Boolean.valueOf(false));
       }
   }
 
@@ -778,7 +784,7 @@
     if (isClosed())
       throw new SocketException("socket is closed");
     
-    getImpl().setOption(SocketOptions.SO_OOBINLINE, new Boolean(on));
+    getImpl().setOption(SocketOptions.SO_OOBINLINE, Boolean.valueOf(on));
   }
 
   /**
@@ -969,7 +975,7 @@
     if (isClosed())
       throw new SocketException("socket is closed");
     
-    getImpl().setOption(SocketOptions.SO_KEEPALIVE, new Boolean(on));
+    getImpl().setOption(SocketOptions.SO_KEEPALIVE, Boolean.valueOf(on));
   }
 
   /**
@@ -1144,7 +1150,7 @@
    */
   public void setReuseAddress (boolean on) throws SocketException
   {
-    getImpl().setOption (SocketOptions.SO_REUSEADDR, new Boolean (on));
+    getImpl().setOption (SocketOptions.SO_REUSEADDR, Boolean.valueOf(on));
   }
 
   /**




More information about the kaffe mailing list