This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new a73234bf82 Fix SpotBugs warnings
a73234bf82 is described below
commit a73234bf8207046079b821cdd19fb2bbe3072f00
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Mar 2 15:29:47 2023 +0000
Fix SpotBugs warnings
---
res/spotbugs/filter-false-positives.xml | 28 +++++++++++++++++-------
test/org/apache/el/TestMethodExpressionImpl.java | 4 +++-
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/res/spotbugs/filter-false-positives.xml
b/res/spotbugs/filter-false-positives.xml
index 71b02b0771..7febcbb7bf 100644
--- a/res/spotbugs/filter-false-positives.xml
+++ b/res/spotbugs/filter-false-positives.xml
@@ -858,6 +858,12 @@
<Method name="invoke"/>
<Bug code="RCN"/>
</Match>
+ <Match>
+ <!-- Deliberately ignored -->
+ <Class name="org.apache.catalina.valves.rewrite.RewriteValve"/>
+ <Method name="parse"/>
+ <Bug pattern="RV_RETURN_VALUE_IGNORED"/>
+ </Match>
<Match>
<!-- request.getQueryString() can be null because
o.a.t.util.buf.MessageBytes.toString() can return NULL -->
@@ -1835,6 +1841,12 @@
<!-- Test code -->
+ <Match>
+ <!-- null is used deliberately -->
+ <Class name="jakarta.el.TestBeanSupport$InvalidIs03Bean" />
+ <Method name="isValue"/>
+ <Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
+ </Match>
<Match>
<!-- Code is deliberately unused -->
<Class name="jakarta.el.TestImportHandler" />
@@ -2271,14 +2283,14 @@
</Match>
<Match>
<!-- Deliberate hack for the purposes of the test -->
- <Class
name="org.apache.coyote.http11.filters.TestChunkedInputFilter$EchoHeaderServlet"/>
- <Field name="exceptionDuringRead"/>
- <Bug pattern="MSF_MUTABLE_SERVLET_FIELD"/>
- </Match>
- <Match>
- <!-- Deliberate hack for the purposes of the test -->
- <Class
name="org.apache.coyote.http11.filters.TestChunkedInputFilter$EchoHeaderServlet"/>
- <Field name="exceptionDuringRead"/>
+ <Or>
+ <Class
name="org.apache.coyote.http11.filters.TestChunkedInputFilter$BodyReadServlet"/>
+ <Class
name="org.apache.coyote.http11.filters.TestChunkedInputFilter$EchoHeaderServlet"/>
+ </Or>
+ <Or>
+ <Field name="countRead"/>
+ <Field name="exceptionDuringRead"/>
+ </Or>
<Bug pattern="MSF_MUTABLE_SERVLET_FIELD"/>
</Match>
<Match>
diff --git a/test/org/apache/el/TestMethodExpressionImpl.java
b/test/org/apache/el/TestMethodExpressionImpl.java
index 9609e517ce..235314c1a0 100644
--- a/test/org/apache/el/TestMethodExpressionImpl.java
+++ b/test/org/apache/el/TestMethodExpressionImpl.java
@@ -41,8 +41,10 @@ public class TestMethodExpressionImpl extends ELBaseTest {
private ELContext context;
private TesterBeanB beanB;
+ @Override
@Before
- public void setUp() {
+ public void setup() {
+ super.setup();
factory = ExpressionFactory.newInstance();
context = new ELContextImpl();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]