On Jun 16, 2013, at 4:14 PM, ma...@apache.org wrote: > Author: markt > Date: Sun Jun 16 21:14:37 2013 > New Revision: 1493584 > > URL: http://svn.apache.org/r1493584 > Log: > Fix FindBugs warnings in test code > > Modified: > tomcat/trunk/res/findbugs/filter-false-positives.xml > > tomcat/trunk/test/org/apache/catalina/core/TestApplicationSessionCookieConfig.java > > Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml > URL: > http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1493584&r1=1493583&r2=1493584&view=diff > ============================================================================== > --- tomcat/trunk/res/findbugs/filter-false-positives.xml (original) > +++ tomcat/trunk/res/findbugs/filter-false-positives.xml Sun Jun 16 21:14:37 > 2013 > @@ -466,6 +466,11 @@ > > <!-- Test code --> > <Match> > + <Class > name="org.apache.catalina.core.TestApplicationSessionCookieConfig$CustomContext" > /> > + <Method name="getState"/> > + <Bug code="UG" /> > + </Match> > + <Match>
Maybe it's just me, but it seems like you should be a little more specific here. Specifying the method or methods and the full bug pattern instead of the code (prefix) would prevent false-negatives if other bugs arose. Of course, at the moment there is only one bug pattern that starts with UG_, but that could change in future versions. > <Or> > <Class name="org.apache.catalina.startup.TestListener$SCL" /> > <Class name="org.apache.catalina.startup.TestListener$SCL3" /> > @@ -586,4 +591,13 @@ > </Or> > <Bug code="RR" /> > </Match> > + <Match> > + <!-- Code is deliberately unused --> > + <Class name="org.apache.tomcat.websocket.server.TestUriTemplate" /> > + <Or> > + <Method name="testBasicPrefix" /> > + <Method name="testQuote2" /> > + </Or> > + <Bug code="DLS" /> > + </Match> > </FindBugsFilter> Same thing. The method names are great here, but there are six bug patterns that start with DLS_. Are you really meaning to suppress all six of them? Just my $0.02. > \ No newline at end of file > > Modified: > tomcat/trunk/test/org/apache/catalina/core/TestApplicationSessionCookieConfig.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestApplicationSessionCookieConfig.java?rev=1493584&r1=1493583&r2=1493584&view=diff > ============================================================================== > --- > tomcat/trunk/test/org/apache/catalina/core/TestApplicationSessionCookieConfig.java > (original) > +++ > tomcat/trunk/test/org/apache/catalina/core/TestApplicationSessionCookieConfig.java > Sun Jun 16 21:14:37 2013 > @@ -126,7 +126,7 @@ public class TestApplicationSessionCooki > } > > private static class CustomContext extends StandardContext { > - private LifecycleState state; > + private volatile LifecycleState state; > > @Override > public LifecycleState getState() { > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org