Fixed some findbugs warnings

This commit is contained in:
Trustin Lee 2008-12-09 00:46:29 +00:00
parent afe9c3c577
commit 6329cbe940
2 changed files with 6 additions and 4 deletions

View File

@ -338,7 +338,7 @@ class NioClientSocketPipelineSink extends AbstractChannelSink {
} }
} }
private final class RegisterTask implements Runnable { private static final class RegisterTask implements Runnable {
private final Boss boss; private final Boss boss;
private final NioSocketChannel channel; private final NioSocketChannel channel;

View File

@ -65,19 +65,21 @@ public class DefaultChannelGroupFuture implements ChannelGroupFuture {
private final ChannelFutureListener childListener = new ChannelFutureListener() { private final ChannelFutureListener childListener = new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) throws Exception { public void operationComplete(ChannelFuture future) throws Exception {
boolean success = future.isSuccess(); boolean success = future.isSuccess();
boolean callSetDone = false;
synchronized (DefaultChannelGroupFuture.this) { synchronized (DefaultChannelGroupFuture.this) {
if (success) { if (success) {
successCount ++; successCount ++;
} else { } else {
failureCount ++; failureCount ++;
} }
callSetDone = successCount + failureCount == futures.size();
assert successCount + failureCount <= futures.size();
} }
if (successCount + failureCount == futures.size()) { if (callSetDone) {
setDone(); setDone();
} }
assert successCount + failureCount <= futures.size();
} }
}; };