Remove unnecessary tests and casts
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 7 Aug 2009 12:35:06 +0000 (12:35 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 7 Aug 2009 12:35:06 +0000 (12:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@801971 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpAprProtocol.java

index 187fad8..7393a6f 100644 (file)
@@ -31,7 +31,6 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.ActionCode;
-import org.apache.coyote.ActionHook;
 import org.apache.coyote.Adapter;
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.RequestGroupInfo;
@@ -378,9 +377,7 @@ public class AjpAprProtocol
                     processor = createProcessor();
                 }
 
-                if (processor instanceof ActionHook) {
-                    ((ActionHook) processor).action(ActionCode.ACTION_START, null);
-                }
+                processor.action(ActionCode.ACTION_START, null);
 
                 if (processor.process(socket)) {
                     return SocketState.OPEN;
@@ -409,9 +406,7 @@ public class AjpAprProtocol
                 AjpAprProtocol.log.error
                     (sm.getString("ajpprotocol.proto.error"), e);
             } finally {
-                if (processor instanceof ActionHook) {
-                    ((ActionHook) processor).action(ActionCode.ACTION_STOP, null);
-                }
+                processor.action(ActionCode.ACTION_STOP, null);
                 recycledProcessors.offer(processor);
             }
             return SocketState.CLOSED;