tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1057246 - in /tomcat/trunk: java/org/apache/catalina/core/StandardHost.java res/findbugs/filter-false-positives.xml
Date Mon, 10 Jan 2011 15:46:19 GMT
Author: markt
Date: Mon Jan 10 15:46:18 2011
New Revision: 1057246

URL: http://svn.apache.org/viewvc?rev=1057246&view=rev
Log:
Fix FindBugs warnings in StandardHost

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
    tomcat/trunk/res/findbugs/filter-false-positives.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHost.java?rev=1057246&r1=1057245&r2=1057246&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardHost.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHost.java Mon Jan 10 15:46:18 2011
@@ -711,28 +711,27 @@ public class StandardHost extends Contai
     protected synchronized void startInternal() throws LifecycleException {
         
         // Set error report valve
-        if ((errorReportValveClass != null)
-            && (!errorReportValveClass.equals(""))) {
+        String errorValve = getErrorReportValveClass();
+        if ((errorValve != null) && (!errorValve.equals(""))) {
             try {
                 boolean found = false;
                 Valve[] valves = getPipeline().getValves();
                 for (Valve valve : valves) {
-                    if (errorReportValveClass.equals(
-                            valve.getClass().getName())) {
+                    if (errorValve.equals(valve.getClass().getName())) {
                         found = true;
                         break;
                     }
                 }
                 if(!found) {
-                    Valve valve = (Valve) Class.forName(errorReportValveClass).
-                            newInstance();
+                    Valve valve =
+                        (Valve) Class.forName(errorValve).newInstance();
                     getPipeline().addValve(valve);
                 }
             } catch (Throwable t) {
                 ExceptionUtils.handleThrowable(t);
-                log.error(sm.getString
-                    ("standardHost.invalidErrorReportValveClass", 
-                     errorReportValveClass), t);
+                log.error(sm.getString(
+                        "standardHost.invalidErrorReportValveClass",
+                        errorValve), t);
             }
         }
         super.startInternal();

Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1057246&r1=1057245&r2=1057246&view=diff
==============================================================================
--- tomcat/trunk/res/findbugs/filter-false-positives.xml (original)
+++ tomcat/trunk/res/findbugs/filter-false-positives.xml Mon Jan 10 15:46:18 2011
@@ -1,6 +1,11 @@
 <FindBugsFilter>
   <!--  Considered to be false positives -->
   <Match>
+    <Class name="org.apache.catalina.core.StandardHost" />
+    <Method name="findReloadedContextMemoryLeaks" />
+    <Bug code="Dm" />
+  </Match>
+  <Match>
     <Class name="org.apache.catalina.startup.HostConfig" />
     <Method name="checkResources" />
     <Bug code="SWL" />



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


Mime
View raw message