Skip to content

Commit

Permalink
remove useless catch exception (apache#3421)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaow authored and lixiaojiee committed Feb 3, 2019
1 parent d2b5914 commit 1a88b32
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,11 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf input, List<Object> out

NettyChannel channel = NettyChannel.getOrAddChannel(ctx.channel(), url, handler);

Object msg;

int saveReaderIndex;

try {
// decode object.
do {
saveReaderIndex = message.readerIndex();
try {
msg = codec.decode(channel, message);
} catch (IOException e) {
throw e;
}
int saveReaderIndex = message.readerIndex();
Object msg = codec.decode(channel, message);
if (msg == Codec2.DecodeResult.NEED_MORE_INPUT) {
message.readerIndex(saveReaderIndex);
break;
Expand Down

0 comments on commit 1a88b32

Please sign in to comment.