Fixed some findbugs warnings
This commit is contained in:
parent
afe9c3c577
commit
6329cbe940
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user