From ea3d9d1d860ae5387ad755402ff12dd02acb5129 Mon Sep 17 00:00:00 2001 From: minjun Date: Sat, 2 Feb 2019 05:30:24 +0800 Subject: [PATCH] remove useless catch exception --- .../remoting/transport/netty4/NettyCodecAdapter.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyCodecAdapter.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyCodecAdapter.java index 24d5d00f926..5f3b7848079 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyCodecAdapter.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyCodecAdapter.java @@ -83,19 +83,11 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf input, List 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;