tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1240851 - /tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java
Date Sun, 05 Feb 2012 22:45:07 GMT
Author: markt
Date: Sun Feb  5 22:45:07 2012
New Revision: 1240851

URL: http://svn.apache.org/viewvc?rev=1240851&view=rev
Log:
Remove a package dependency

Modified:
    tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java?rev=1240851&r1=1240850&r2=1240851&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java Sun Feb  5 22:45:07 2012
@@ -38,7 +38,7 @@ import org.apache.catalina.core.Standard
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.startup.ContextConfig;
 import org.apache.catalina.startup.HostConfig;
-import org.apache.catalina.valves.ValveBase;
+// import org.apache.catalina.valves.ValveBase;
 import org.apache.tomcat.util.modeler.BaseModelMBean;
 
 public class ContainerMBean extends BaseModelMBean {
@@ -208,9 +208,12 @@ public class ContainerMBean extends Base
         if(container != null){
             Valve[] valves = container.getPipeline().getValves();
             for (int i = 0; i < valves.length; i++) {
-                ObjectName voname = ((ValveBase) valves[i]).getObjectName();
-                if (voname.equals(oname)) {
-                    container.getPipeline().removeValve(valves[i]);
+                if (valves[i] instanceof JmxEnabled) {
+                    ObjectName voname =
+                            ((JmxEnabled) valves[i]).getObjectName();
+                    if (voname.equals(oname)) {
+                        container.getPipeline().removeValve(valves[i]);
+                    }
                 }
             }
         }



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


Mime
View raw message