Author: markt Date: Mon Dec 5 11:26:05 2016 New Revision: 1772640 URL: http://svn.apache.org/viewvc?rev=1772640&view=rev Log: Back-port findbugs fixes from trunk
Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java tomcat/tc8.5.x/trunk/res/findbugs/filter-false-positives.xml Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java?rev=1772640&r1=1772639&r2=1772640&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java Mon Dec 5 11:26:05 2016 @@ -152,6 +152,7 @@ public class ChunkedInputFilter implemen * @deprecated Unused. Will be removed in Tomcat 9. Use * {@link #doRead(ApplicationBufferHandler)} */ + @Deprecated @Override public int doRead(ByteChunk chunk) throws IOException { if (endChunk) { @@ -504,6 +505,7 @@ public class ChunkedInputFilter implemen } } + // readBytes() above will set readChunk unless it returns a value < 0 chr = readChunk.get(readChunk.position()); // CRLF terminates the request @@ -530,6 +532,7 @@ public class ChunkedInputFilter implemen } } + // readBytes() above will set readChunk unless it returns a value < 0 chr = readChunk.get(readChunk.position()); if ((chr >= Constants.A) && (chr <= Constants.Z)) { chr = (byte) (chr - Constants.LC_OFFSET); Modified: tomcat/tc8.5.x/trunk/res/findbugs/filter-false-positives.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/res/findbugs/filter-false-positives.xml?rev=1772640&r1=1772639&r2=1772640&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/res/findbugs/filter-false-positives.xml (original) +++ tomcat/tc8.5.x/trunk/res/findbugs/filter-false-positives.xml Mon Dec 5 11:26:05 2016 @@ -418,6 +418,12 @@ <Bug pattern="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION" /> </Match> <Match> + <!-- readChunk will not be null due to previous call to readBytes() --> + <Class name="org.apache.coyote.http11.filters.ChunkedInputFilter" /> + <Method name="parseHeader"/> + <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" /> + </Match> + <Match> <!-- Locks are always released. Non-standard pattern is required because --> <!-- of lock upgrade that is used. --> <Class name="org.apache.coyote.http11.upgrade.AprServletInputStream" /> @@ -452,6 +458,12 @@ <Bug code="UL" /> </Match> <Match> + <!-- HpackDecoder is used by multiple streams but not concurrently. --> + <Class name="org.apache.coyote.http2.HpackDecoder" /> + <Method name="emitHeader" /> + <Bug pattern="VO_VOLATILE_INCREMENT" /> + </Match> + <Match> <!-- Number being tested is unsigned. --> <Class name="org.apache.coyote.http2.Http2UpgradeHandler" /> <Method name="createRemoteStream" /> @@ -931,6 +943,12 @@ <Bug code="UG" /> </Match> <Match> + <!-- Return value of latch is intentionally ignored --> + <Class name="org.apache.catalina.connector.TestSendFile"/> + <Method name="testBug60409"/> + <Bug pattern="RV_RETURN_VALUE_IGNORED"/> + </Match> + <Match> <Or> <Class name="org.apache.catalina.startup.TestListener$SCL" /> <Class name="org.apache.catalina.startup.TestListener$SCL3" /> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org