You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/12/23 23:54:15 UTC

svn commit: r1425550 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Author: markt
Date: Sun Dec 23 22:54:15 2012
New Revision: 1425550

URL: http://svn.apache.org/viewvc?rev=1425550&view=rev
Log:
Simplify

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1425550&r1=1425549&r2=1425550&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Sun Dec 23 22:54:15 2012
@@ -1558,16 +1558,12 @@ public class NioEndpoint extends Abstrac
                         // Process the request from this socket
                         // Suppress null warnings for key in this block since
                         // key can't be null in this block
+                        KeyAttachment ka = (KeyAttachment)key.attachment();
                         if (status == null) {
-                            state = handler.process(
-                                    (KeyAttachment) key.attachment(),
-                                    SocketStatus.OPEN_READ);
+                            state = handler.process(ka, SocketStatus.OPEN_READ);
                         } else {
-                            state = handler.process(
-                                    (KeyAttachment) key.attachment(),
-                                    status);
+                            state = handler.process(ka, status);
                         }
-                        KeyAttachment ka = (KeyAttachment)key.attachment();
                         if (state == SocketState.CLOSED) {
                             // Close socket and pool
                             try {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org