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 NioSocketChannel channel;

View File

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