Removed unnecessary 'else'
This commit is contained in:
parent
247251420a
commit
5d6ef046cd
@ -160,7 +160,9 @@ public class LengthFieldBasedFrameDecoder extends FrameDecoder {
|
|||||||
throw new CorruptedFrameException(
|
throw new CorruptedFrameException(
|
||||||
"Adjusted length (" + frameLength + ") is less than " +
|
"Adjusted length (" + frameLength + ") is less than " +
|
||||||
lengthFieldEndOffset);
|
lengthFieldEndOffset);
|
||||||
} else if (frameLength > maxFrameLength) {
|
}
|
||||||
|
|
||||||
|
if (frameLength > maxFrameLength) {
|
||||||
// Enter the discard mode and discard everything received so far.
|
// Enter the discard mode and discard everything received so far.
|
||||||
discardingTooLongFrame = true;
|
discardingTooLongFrame = true;
|
||||||
tooLongFrameLength = frameLength;
|
tooLongFrameLength = frameLength;
|
||||||
@ -173,8 +175,8 @@ public class LengthFieldBasedFrameDecoder extends FrameDecoder {
|
|||||||
int frameLengthInt = (int) frameLength;
|
int frameLengthInt = (int) frameLength;
|
||||||
if (buffer.readableBytes() < frameLengthInt) {
|
if (buffer.readableBytes() < frameLengthInt) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
|
||||||
return buffer.readBytes(frameLengthInt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return buffer.readBytes(frameLengthInt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user