tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From violet...@apache.org
Subject svn commit: r1720804 - in /tomcat/trunk: java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java java/org/apache/catalina/startup/HostConfig.java java/org/apache/jasper/compiler/TagFileProcessor.java res/findbugs/filter-false-positives.xml
Date Fri, 18 Dec 2015 15:02:38 GMT
Author: violetagg
Date: Fri Dec 18 15:02:38 2015
New Revision: 1720804

URL: http://svn.apache.org/viewvc?rev=1720804&view=rev
Log:
Fixed findbugs issues - Comparison of String parameter using == or !=. Update false positives
filter.

Modified:
    tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
    tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
    tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
    tomcat/trunk/res/findbugs/filter-false-positives.xml

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1720804&r1=1720803&r2=1720804&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java Fri Dec 18
15:02:38 2015
@@ -203,7 +203,7 @@ public class JmxRemoteLifecycleListener
     @Override
     public void lifecycleEvent(LifecycleEvent event) {
         // When the server starts, configure JMX/RMI
-        if (Lifecycle.START_EVENT == event.getType()) {
+        if (Lifecycle.START_EVENT.equals(event.getType())) {
             // Configure using standard jmx system properties
             init();
 
@@ -284,7 +284,7 @@ public class JmxRemoteLifecycleListener
             csPlatform = createServer("Platform", rmiBindAddress, rmiRegistryPortPlatform,
                     rmiServerPortPlatform, env, registryCsf, registrySsf, serverCsf, serverSsf);
 
-        } else if (Lifecycle.STOP_EVENT == event.getType()) {
+        } else if (Lifecycle.STOP_EVENT.equals(event.getType())) {
             destroyServer("Platform", csPlatform);
         }
     }

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1720804&r1=1720803&r2=1720804&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Fri Dec 18 15:02:38 2015
@@ -1832,7 +1832,7 @@ public class HostConfig implements Lifec
 
         @Override
         public void lifecycleEvent(LifecycleEvent event) {
-            if (event.getType() == Lifecycle.AFTER_STOP_EVENT) {
+            if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) {
                 // The context has stopped.
                 Context context = (Context) event.getLifecycle();
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1720804&r1=1720803&r2=1720804&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Fri Dec 18 15:02:38
2015
@@ -423,7 +423,7 @@ class TagFileProcessor {
         private void checkUniqueName(String name, String type, Node n,
                 TagAttributeInfo attr) throws JasperException {
 
-            HashMap<String, NameEntry> table = (type == VAR_NAME_FROM) ? nameFromTable
: nameTable;
+            HashMap<String, NameEntry> table = (VAR_NAME_FROM.equals(type)) ? nameFromTable
: nameTable;
             NameEntry nameEntry = table.get(name);
             if (nameEntry != null) {
                 if (!TAG_DYNAMIC.equals(type) ||

Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1720804&r1=1720803&r2=1720804&view=diff
==============================================================================
--- tomcat/trunk/res/findbugs/filter-false-positives.xml (original)
+++ tomcat/trunk/res/findbugs/filter-false-positives.xml Fri Dec 18 15:02:38 2015
@@ -350,6 +350,12 @@
     <Bug code="ES"/>
   </Match>
   <Match>
+    <!-- Use of == is deliberate, String.intern() is used -->
+    <Class name="org.apache.jasper.xmlparser.XMLEncodingDetector"/>
+    <Method name="scanXMLDeclOrTextDecl"/>
+    <Bug code="ES"/>
+  </Match>
+  <Match>
     <!-- Stream is closed in o.a.juli.ClassLoaderLogManager.readConfiguration
          (InputStream, ClassLoader) -->
     <Class name="org.apache.juli.ClassLoaderLogManager"/>



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


Mime
View raw message