2004-02-05 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Thu, 5 Feb 2004 15:57:01 +0000 (15:57 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Thu, 5 Feb 2004 15:57:01 +0000 (15:57 +0000)
* gnu/java/nio/NIOServerSocket.java
(impl): Unused, removed.
* gnu/java/nio/SocketChannelImpl.java
(finnishConnect): Don't throw NoConnectionPendingException if not
connected or no connection pending.

From-SVN: r77317

libjava/ChangeLog
libjava/gnu/java/nio/NIOServerSocket.java
libjava/gnu/java/nio/SocketChannelImpl.java

index 35e896f1e18bc41a3efb4419187c053a25d1587d..69b5a5265f4630bc353d85a49443935be69acfc3 100644 (file)
@@ -1,3 +1,11 @@
+2004-02-05  Michael Koch  <konqueror@gmx.de>
+
+       * gnu/java/nio/NIOServerSocket.java
+       (impl): Unused, removed.
+       * gnu/java/nio/SocketChannelImpl.java
+       (finnishConnect): Don't throw NoConnectionPendingException if not
+       connected or no connection pending.
+
 2004-02-02  Graydon Hoare  <graydon@redhat.com>
 
        * javax/swing/SwingUtilities.java: Many new functions.
index 89def3bb5ee2f2fc439ed6cf6e1178e4a297b4de..3164247765b472a805abaa27e14ab0128d628b2d 100644 (file)
@@ -1,5 +1,5 @@
 /* NIOServerSocket.java -- 
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -50,7 +50,6 @@ import java.nio.channels.SocketChannel;
  */
 public final class NIOServerSocket extends ServerSocket
 {
-  private PlainSocketImpl impl;
   private ServerSocketChannelImpl channel;
     
   protected NIOServerSocket (ServerSocketChannelImpl channel)
index d490529f87396e443ffe0d1442a576318bfb72a4..d4dd6e0565330aca17887bb1d0fe69084b382f68 100644 (file)
@@ -174,7 +174,7 @@ public final class SocketChannelImpl extends SocketChannel
     if (!isOpen())
       throw new ClosedChannelException();
     
-    if (!connectionPending)
+    if (!isConnected() && !connectionPending)
       throw new NoConnectionPendingException();
     
     if (isConnected())