You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/24 06:22:30 UTC

[GitHub] [dubbo] changfubai commented on a change in pull request #8587: Fix on branch master, consumer invoke timeout cause NPE.

changfubai commented on a change in pull request #8587:
URL: https://github.com/apache/dubbo/pull/8587#discussion_r694533350



##########
File path: dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcResult.java
##########
@@ -118,11 +118,13 @@ public Object decode(Channel channel, InputStream input) throws IOException {
     public void decode() throws Exception {
         if (!hasDecoded && channel != null && inputStream != null) {
             try {
-                if (ConfigurationUtils.getSystemConfiguration().getBoolean(SERIALIZATION_SECURITY_CHECK_KEY, false)) {
-                    Object serializationType_obj = invocation.get(SERIALIZATION_ID_KEY);
-                    if (serializationType_obj != null) {
-                        if ((byte) serializationType_obj != serializationType) {
-                            throw new IOException("Unexpected serialization id:" + serializationType + " received from network, please check if the peer send the right id.");
+                if (invocation != null) {
+                    if (ConfigurationUtils.getSystemConfiguration().getBoolean(SERIALIZATION_SECURITY_CHECK_KEY, false)) {

Review comment:
       I think it's better to check null after line 122




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org