harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r923107 - /harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
Date Mon, 15 Mar 2010 08:05:31 GMT
Author: regisxu
Date: Mon Mar 15 08:05:30 2010
New Revision: 923107

URL: http://svn.apache.org/viewvc?rev=923107&view=rev
Log:
Apply patch for HARMONY-6472: [classlib][nio]ServerSocketChannelImpl's field status is unread.

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

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java?rev=923107&r1=923106&r2=923107&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
Mon Mar 15 08:05:30 2010
@@ -42,15 +42,6 @@ import org.apache.harmony.luni.platform.
 public class ServerSocketChannelImpl extends ServerSocketChannel implements
         FileDescriptorHandler {
 
-    // status un-init, not initialized.
-    private static final int SERVER_STATUS_UNINIT = -1;
-
-    // status after open and before closed.
-    private static final int SERVER_STATUS_OPEN = 0;
-
-    // status closed.
-    private static final int SERVER_STATUS_CLOSED = 1;
-
     // The fd to interact with native code
     private final FileDescriptor fd;
 
@@ -59,8 +50,6 @@ public class ServerSocketChannelImpl ext
 
     private final SocketImpl impl;
 
-    int status = SERVER_STATUS_UNINIT;
-
     // whether the socket is bound
     boolean isBound = false;
 
@@ -73,7 +62,6 @@ public class ServerSocketChannelImpl ext
      */
     public ServerSocketChannelImpl(SelectorProvider sp) throws IOException {
         super(sp);
-        status = SERVER_STATUS_OPEN;
         fd = new FileDescriptor();
         Platform.getNetworkSystem().createStreamSocket(fd,
                 NetUtil.preferIPv4Stack());
@@ -85,7 +73,6 @@ public class ServerSocketChannelImpl ext
     @SuppressWarnings("unused")
     private ServerSocketChannelImpl() throws IOException {
         super(SelectorProvider.provider());
-        status = SERVER_STATUS_OPEN;
         fd = new FileDescriptor();
         impl = new PlainServerSocketImpl(fd);
         socket = new ServerSocketAdapter(impl, this);
@@ -168,7 +155,6 @@ public class ServerSocketChannelImpl ext
      * @see java.nio.channels.spi.AbstractSelectableChannel#implCloseSelectableChannel()
      */
     synchronized protected void implCloseSelectableChannel() throws IOException {
-        status = SERVER_STATUS_CLOSED;
         if (!socket.isClosed()) {
             socket.close();
         }
@@ -289,7 +275,6 @@ public class ServerSocketChannelImpl ext
                 } else {
                     super.close();
                 }
-                channelImpl.status = SERVER_STATUS_CLOSED;
             }
         }
     }



Mime
View raw message