You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/07/03 13:09:54 UTC

svn commit: r418742 - /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java

Author: tellison
Date: Mon Jul  3 04:09:54 2006
New Revision: 418742

URL: http://svn.apache.org/viewvc?rev=418742&view=rev
Log:
Apply patch HARMONY-726 ([classlib][nio] Remove unnecessary check for AsynchronousCloseException in ServerSocketChannelImpl.)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java?rev=418742&r1=418741&r2=418742&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java Mon Jul  3 04:09:54 2006
@@ -16,14 +16,12 @@
 
 import java.io.FileDescriptor;
 import java.io.IOException;
-import java.net.BindException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketAddress;
 import java.net.SocketException;
 import java.net.SocketImpl;
 import java.net.SocketTimeoutException;
-import java.nio.channels.AsynchronousCloseException;
 import java.nio.channels.ClosedChannelException;
 import java.nio.channels.NotYetBoundException;
 import java.nio.channels.SelectableChannel;
@@ -56,9 +54,6 @@
     // status closed.
     private static final int SERVER_STATUS_CLOSED = 1;
 
-    // error message, for native dependent.
-    private static final String ERRMSG_ASYNCHRONOUS = "The call was cancelled"; //$NON-NLS-1$
-
     // -------------------------------------------------------------------
     // Instance variables
     // -------------------------------------------------------------------
@@ -157,11 +152,6 @@
                     } while (isBlocking);
                 }
             }
-        } catch (BindException e) {
-            // FIXME improve native code.
-            if (ERRMSG_ASYNCHRONOUS.equals(e.getMessage())) {
-                throw new AsynchronousCloseException();
-            }
         } finally {
             end(socketGot.isConnected());
         }
@@ -257,10 +247,6 @@
                             aSocket.getPort());
                 }
                 connectOK = true;
-            } catch (SocketException e) {
-                if (ERRMSG_ASYNCHRONOUS.equals(e.getMessage())) {
-                    throw new AsynchronousCloseException();
-                }
             } finally {
                 if (!connectOK) {
                     aSocket.close();