Code clean-up
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 13 Sep 2010 17:28:53 +0000 (17:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 13 Sep 2010 17:28:53 +0000 (17:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@996608 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11AprProtocol.java
java/org/apache/coyote/http11/Http11NioProcessor.java

index ac5a0f1..eaacecc 100644 (file)
@@ -353,7 +353,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor implements Actio
     }
 
     /* Copied from the AjpProcessor.java */
-    public SocketState asyncDispatch(long socket, SocketStatus status) throws IOException {
+    public SocketState asyncDispatch(long socket, SocketStatus status) {
 
         // Setting up the socket
         this.socket = socket;
@@ -439,6 +439,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor implements Actio
      * @param actionCode Type of the action
      * @param param Action parameter
      */
+    @Override
     public void action(ActionCode actionCode, Object param) {
 
         if (actionCode == ActionCode.ACTION_COMMIT) {
index 92a025a..f3ffe99 100644 (file)
@@ -251,6 +251,7 @@ public class Http11AprProtocol extends AbstractHttp11Protocol {
             new ConcurrentHashMap<Long, Http11AprProcessor>();
         protected ConcurrentLinkedQueue<Http11AprProcessor> recycledProcessors = 
             new ConcurrentLinkedQueue<Http11AprProcessor>() {
+            private static final long serialVersionUID = 1L;
             protected AtomicInteger size = new AtomicInteger(0);
             @Override
             public boolean offer(Http11AprProcessor processor) {
@@ -396,21 +397,10 @@ public class Http11AprProtocol extends AbstractHttp11Protocol {
                 // Call the appropriate event
                 try {
                     state = result.asyncDispatch(socket, status);
-                } catch (java.net.SocketException e) {
-                    // SocketExceptions are normal
-                    Http11AprProtocol.log.debug
-                        (sm.getString
-                            ("http11protocol.proto.socketexception.debug"), e);
-                } catch (java.io.IOException e) {
-                    // IOExceptions are normal
-                    Http11AprProtocol.log.debug
-                        (sm.getString
-                            ("http11protocol.proto.ioexception.debug"), e);
-                }
-                // Future developers: if you discover any other
-                // rare-but-nonfatal exceptions, catch them here, and log as
+                // Future developers: if you discover any rare-but-nonfatal
+                // exceptions, catch them here, and log as per {@link #event()}
                 // above.
-                catch (Throwable e) {
+                catch (Throwable e) {
                     // any other exception or error is odd. Here we log it
                     // with "ERROR" level, so it will show up even on
                     // less-than-verbose logs.
index 7b5a662..4670f27 100644 (file)
@@ -514,6 +514,7 @@ public class Http11NioProcessor extends AbstractHttp11Processor implements Actio
      * @param actionCode Type of the action
      * @param param Action parameter
      */
+    @Override
     public void action(ActionCode actionCode, Object param) {
 
         if (actionCode == ActionCode.ACTION_COMMIT) {
@@ -1047,7 +1048,7 @@ public class Http11NioProcessor extends AbstractHttp11Processor implements Actio
      * When committing the response, we have to validate the set of headers, as
      * well as setup the response filters.
      */
-    protected void prepareResponse() throws IOException {
+    protected void prepareResponse() {
 
         boolean entityBody = true;
         contentDelimitation = false;