Fixed incorrect conditional statements

This commit is contained in:
Trustin Lee 2008-12-03 08:09:10 +00:00
parent 40ebf2b710
commit 017dfff527
3 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ abstract class AbstractCodecEmbedder<T> implements CodecEmbedder<T> {
fireChannelDisconnected(context, channel);
fireChannelUnbound(context, channel);
fireChannelClosed(context, channel);
return context.productQueue.isEmpty();
return !context.productQueue.isEmpty();
}
@SuppressWarnings("unchecked")

View File

@ -38,7 +38,7 @@ public class DecoderEmbedder<T> extends AbstractCodecEmbedder<T> {
}
public boolean offer(Object input) {
fireMessageReceived(context.getChannel(), input);
return context.productQueue.isEmpty();
fireMessageReceived(context, context.getChannel(), input);
return !context.productQueue.isEmpty();
}
}

View File

@ -41,6 +41,6 @@ public class EncoderEmbedder<T> extends AbstractCodecEmbedder<T> {
public boolean offer(Object input) {
Channel channel = context.getChannel();
write(context, channel, succeededFuture(channel), input);
return context.productQueue.isEmpty();
return !context.productQueue.isEmpty();
}
}