mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-01 11:47:51 +08:00
NettyDecoder class decode method switch case remove break (#3035)
This commit is contained in:
parent
d87d2d80dd
commit
1eb8fb6db3
@ -55,19 +55,15 @@ public class NettyDecoder extends ReplayingDecoder<NettyDecoder.State> {
|
||||
case MAGIC:
|
||||
checkMagic(in.readByte());
|
||||
checkpoint(State.COMMAND);
|
||||
break;
|
||||
case COMMAND:
|
||||
commandHeader.setType(in.readByte());
|
||||
checkpoint(State.OPAQUE);
|
||||
break;
|
||||
case OPAQUE:
|
||||
commandHeader.setOpaque(in.readLong());
|
||||
checkpoint(State.BODY_LENGTH);
|
||||
break;
|
||||
case BODY_LENGTH:
|
||||
commandHeader.setBodyLength(in.readInt());
|
||||
checkpoint(State.BODY);
|
||||
break;
|
||||
case BODY:
|
||||
byte[] body = new byte[commandHeader.getBodyLength()];
|
||||
in.readBytes(body);
|
||||
@ -79,7 +75,6 @@ public class NettyDecoder extends ReplayingDecoder<NettyDecoder.State> {
|
||||
out.add(packet);
|
||||
//
|
||||
checkpoint(State.MAGIC);
|
||||
break;
|
||||
default:
|
||||
logger.warn("unknown decoder state {}", state());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user