Author: markt Date: Thu Jan 17 15:48:25 2013 New Revision: 1434740 URL: http://svn.apache.org/viewvc?rev=1434740&view=rev Log: FindBugs false positive. It may not be immediately clear why this is a false positive so add a comment to explain it.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java tomcat/trunk/res/findbugs/filter-false-positives.xml Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1434740&r1=1434739&r2=1434740&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Jan 17 15:48:25 2013 @@ -1440,6 +1440,9 @@ public class NioEndpoint extends Abstrac protected void awaitLatch(CountDownLatch latch, long timeout, TimeUnit unit) throws InterruptedException { if ( latch == null ) throw new IllegalStateException("Latch cannot be null"); + // Note: While the return value is ignored if the latch does time + // out, logic further up the call stack will trigger a + // SocketTimeoutException latch.await(timeout,unit); } public void awaitReadLatch(long timeout, TimeUnit unit) throws InterruptedException { awaitLatch(readLatch,timeout,unit);} Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1434740&r1=1434739&r2=1434740&view=diff ============================================================================== --- tomcat/trunk/res/findbugs/filter-false-positives.xml (original) +++ tomcat/trunk/res/findbugs/filter-false-positives.xml Thu Jan 17 15:48:25 2013 @@ -361,6 +361,13 @@ <Bug code="ML"/> </Match> <Match> + <!-- Return value is ignored at this point but logic further up call --> + <!-- stack will ensure that a SocketTimeoutException is thrown --> + <Class name="org.apache.tomcat.util.net.NioEndpoint$KeyAttachment"/> + <Method name="awaitLatch"/> + <Bug code="RV"/> + </Match> + <Match> <!-- Object is only ever set to null, sync therefore is still valid --> <Class name="org.apache.tomcat.util.net.NioEndpoint$SocketProcessor"/> <Method name="run"/> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org