From 6f6ef6c9f2100e6d9a69c0337601d766f5587dea Mon Sep 17 00:00:00 2001 From: tswstarplanet Date: Tue, 11 Dec 2018 15:02:18 +0800 Subject: [PATCH] [dubbo-2766] fix the bug of isMatch method of InvokeTelnetHandler (#2787) --- .../dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java index b250c1e1f1c..b13a7f0356d 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java @@ -87,6 +87,10 @@ private static boolean isMatch(Class[] types, List args) { 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();