[dubbo-2766] fix the bug of isMatch method of InvokeTelnetHandler (#2787)
authortswstarplanet <tswstarplanet@163.com>
Tue, 11 Dec 2018 07:02:18 +0000 (15:02 +0800)
committerIan Luo <ian.luo@gmail.com>
Tue, 11 Dec 2018 07:02:18 +0000 (15:02 +0800)
dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java

index b250c1e..b13a7f0 100644 (file)
@@ -87,6 +87,10 @@ public class InvokeTelnetHandler implements TelnetHandler {
                 if (!ReflectUtils.isPrimitive(type)) {
                     return false;
                 }
+                Class<?> boxedType = ReflectUtils.getBoxedClass(type);
+                if (boxedType != arg.getClass()) {
+                    return false;
+                }
             } else if (arg instanceof Map) {
                 String name = (String) ((Map<?, ?>) arg).get("class");
                 Class<?> cls = arg.getClass();