Improve fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49414
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 26 Jun 2010 07:04:32 +0000 (07:04 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 26 Jun 2010 07:04:32 +0000 (07:04 +0000)
Just look for presence of CoyoteAdapter class

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@958192 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/loader/WebappClassLoader.java

index 13e419b..642ed04 100644 (file)
@@ -2260,15 +2260,14 @@ public class WebappClassLoader
             return false;
         }
         
-        // Step through the methods in reverse order looking for a
-        // CoyoteAdapter.service() call. All requests will have this unless
+        // Step through the methods in reverse order looking for calls to any
+        // CoyoteAdapter method. All request threads will have this unless
         // Tomcat has been heavily modified - in which case there isn't much we
         // can do.
         for (int i = 0; i < elements.length; i++) {
             StackTraceElement element = elements[elements.length - (i+1)];
             if ("org.apache.catalina.connector.CoyoteAdapter".equals(
-                    element.getClassName()) &&
-                    "service".equals(element.getMethodName())) {
+                    element.getClassName())) {
                 return true;
             }
         }