Author: markt Date: Tue Jun 5 18:32:27 2018 New Revision: 1832959 URL: http://svn.apache.org/viewvc?rev=1832959&view=rev Log: SpotBugs: Use of new String(String)
Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.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=1832959&r1=1832958&r2=1832959&view=diff ============================================================================== --- tomcat/trunk/res/findbugs/filter-false-positives.xml (original) +++ tomcat/trunk/res/findbugs/filter-false-positives.xml Tue Jun 5 18:32:27 2018 @@ -179,6 +179,12 @@ <Bug pattern="IS2_INCONSISTENT_SYNC" /> </Match> <Match> + <!-- Use of new String() is deliberate --> + <Class name="org.apache.catalina.core.StandardContext" /> + <Method name="setResponseCharacterEncoding" /> + <Bug pattern="DM_STRING_CTOR" /> + </Match> + <Match> <!-- Have to trigger GC for leak detection to work. Clearly documented --> <Class name="org.apache.catalina.core.StandardHost" /> <Method name="findReloadedContextMemoryLeaks" /> Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java?rev=1832959&r1=1832958&r2=1832959&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java Tue Jun 5 18:32:27 2018 @@ -40,8 +40,7 @@ import org.apache.tomcat.websocket.Teste public class TestWsPingPongMessages extends WebSocketBaseTest { - ByteBuffer applicationData = - ByteBuffer.wrap(new String("mydata").getBytes(StandardCharsets.UTF_8)); + ByteBuffer applicationData = ByteBuffer.wrap("mydata".getBytes(StandardCharsets.UTF_8)); @Test public void testPingPongMessages() throws Exception { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org