You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2018/02/27 22:43:37 UTC

svn commit: r1825515 - in /tomcat/trunk: java/org/apache/jasper/compiler/JspDocumentParser.java res/findbugs/filter-false-positives.xml

Author: markt
Date: Tue Feb 27 22:43:37 2018
New Revision: 1825515

URL: http://svn.apache.org/viewvc?rev=1825515&view=rev
Log:
SpotBugs
Suppress false positive.

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
    tomcat/trunk/res/findbugs/filter-false-positives.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1825515&r1=1825514&r2=1825515&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Tue Feb 27 22:43:37 2018
@@ -735,8 +735,7 @@ class JspDocumentParser
             startMark = new Mark(ctxt, path, locator.getLineNumber(),
                     locator.getColumnNumber());
             @SuppressWarnings("unused")
-            Node unused = new Node.Comment(
-                    new String(buf, offset, len), startMark, current);
+            Node unused = new Node.Comment(new String(buf, offset, len), startMark, current);
         }
     }
 

Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1825515&r1=1825514&r2=1825515&view=diff
==============================================================================
--- tomcat/trunk/res/findbugs/filter-false-positives.xml (original)
+++ tomcat/trunk/res/findbugs/filter-false-positives.xml Tue Feb 27 22:43:37 2018
@@ -732,6 +732,13 @@
     <Bug code="NP"/>
   </Match>
   <Match>
+    <!-- Yes this is a dead store. This is so the IDE warning can be suppressed.
+         The object creation has side-effects so the code is required. -->
+    <Class name="org.apache.jasper.compiler.JspDocumentParser" />
+    <Method name="comment"/>
+    <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
+  </Match>
+  <Match>
     <!-- Returning null is intentional -->
     <Class name="org.apache.jasper.compiler.JspReader"/>
     <Method name="indexOf"/>



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