Removed unnecessary 'else'

This commit is contained in:
Trustin Lee 2009-01-06 05:32:44 +00:00
parent 247251420a
commit 5d6ef046cd

View File

@ -160,7 +160,9 @@ public class LengthFieldBasedFrameDecoder extends FrameDecoder {
throw new CorruptedFrameException(
"Adjusted length (" + frameLength + ") is less than " +
lengthFieldEndOffset);
} else if (frameLength > maxFrameLength) {
}
if (frameLength > maxFrameLength) {
// Enter the discard mode and discard everything received so far.
discardingTooLongFrame = true;
tooLongFrameLength = frameLength;
@ -173,8 +175,8 @@ public class LengthFieldBasedFrameDecoder extends FrameDecoder {
int frameLengthInt = (int) frameLength;
if (buffer.readableBytes() < frameLengthInt) {
return null;
} else {
return buffer.readBytes(frameLengthInt);
}
return buffer.readBytes(frameLengthInt);
}
}