From 27189ed91ce964637045d17d2d3413bb5da35aad Mon Sep 17 00:00:00 2001 From: qixiaobo Date: Sat, 20 Jul 2019 16:01:04 +0800 Subject: [PATCH] Dubbo throws exception when use java serializer #4612 --- .../java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java index 3b8fe669011..f9134379adc 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java @@ -120,10 +120,11 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro } try { Object data; - ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto); if (req.isHeartbeat()) { + ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto); data = decodeHeartbeatData(channel, in); } else if (req.isEvent()) { + ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto); data = decodeEventData(channel, in); } else { DecodeableRpcInvocation inv;