You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2022/03/17 06:23:07 UTC

[dubbo] branch 3.0 updated: No longer catch the argument decode exception in the inner decode method, to avoid the parameter being null when the decode fails, and a NullPointerException will be thrown when the parameter is used by the actual provider, causing the consumer to fail to obtain the original decode exception. (#9490)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 05638ba  No longer catch the argument decode exception in the inner decode method, to avoid the parameter being null when the decode fails, and a NullPointerException will be thrown when the parameter is used by the actual provider, causing the consumer to fail to obtain the original decode exception. (#9490)
05638ba is described below

commit 05638ba7a6a13c58db9004c12b7e0b5fa79a20f8
Author: Poison <ti...@gmail.com>
AuthorDate: Thu Mar 17 14:22:23 2022 +0800

    No longer catch the argument decode exception in the inner decode method, to avoid the parameter being null when the decode fails, and a NullPointerException will be thrown when the parameter is used by the actual provider, causing the consumer to fail to obtain the original decode exception. (#9490)
    
    fixes #9489
---
 .../apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java  | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
index 045abba..a67c935 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
@@ -210,13 +210,7 @@ public class DecodeableRpcInvocation extends RpcInvocation implements Codec, Dec
 
                 args = new Object[pts.length];
                 for (int i = 0; i < args.length; i++) {
-                    try {
-                        args[i] = in.readObject(pts[i]);
-                    } catch (Exception e) {
-                        if (log.isWarnEnabled()) {
-                            log.warn("Decode argument failed: " + e.getMessage(), e);
-                        }
-                    }
+                    args[i] = in.readObject(pts[i]);
                 }
             }
             setParameterTypes(pts);