remove useless catch exception (#3421)
authormjaow <mjaow0128@gmail.com>
Sun, 3 Feb 2019 12:08:20 +0000 (20:08 +0800)
committerXiaoJie Li <lixiaojie@apache.org>
Sun, 3 Feb 2019 12:08:20 +0000 (20:08 +0800)
dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyCodecAdapter.java

index 24d5d00..5f3b784 100644 (file)
@@ -83,19 +83,11 @@ final class NettyCodecAdapter {
 
             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;