From e99412bbf998af685c3f85136ca35cd1a0786ebb Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 10 Mar 2011 10:34:09 +0000 Subject: [PATCH] status is always null, so simplify git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1080173 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/net/AprEndpoint.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 3eb997d56..194270be2 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -760,8 +760,7 @@ public class AprEndpoint extends AbstractEndpoint { if (running) { SocketWrapper wrapper = new SocketWrapper(Long.valueOf(socket)); - getExecutor().execute( - new SocketWithOptionsProcessor(wrapper, null)); + getExecutor().execute(new SocketWithOptionsProcessor(wrapper)); } } catch (RejectedExecutionException x) { log.warn("Socket processing request was rejected for:"+socket,x); @@ -1642,13 +1641,10 @@ public class AprEndpoint extends AbstractEndpoint { protected class SocketWithOptionsProcessor implements Runnable { protected SocketWrapper socket = null; - protected SocketStatus status = null; - public SocketWithOptionsProcessor(SocketWrapper socket, - SocketStatus status) { + public SocketWithOptionsProcessor(SocketWrapper socket) { this.socket = socket; - this.status = status; } @Override @@ -1671,7 +1667,7 @@ public class AprEndpoint extends AbstractEndpoint { socket = null; } // Process the request from this socket - Handler.SocketState state = (status==null)?handler.process(socket):handler.asyncDispatch(socket, status); + Handler.SocketState state = handler.process(socket); if (state == Handler.SocketState.CLOSED) { // Close socket and pool destroySocket(socket.getSocket().longValue()); @@ -1683,7 +1679,8 @@ public class AprEndpoint extends AbstractEndpoint { } } else if (state == Handler.SocketState.ASYNC_END) { socket.access(); - SocketProcessor proc = new SocketProcessor(socket, SocketStatus.OPEN); + SocketProcessor proc = + new SocketProcessor(socket, SocketStatus.OPEN); getExecutor().execute(proc); } } -- 2.11.0