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..df3ffd302dc 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 @@ -17,7 +17,6 @@ package org.apache.dubbo.rpc.protocol.dubbo.telnet; import org.apache.dubbo.common.extension.Activate; -import org.apache.dubbo.common.utils.CompatibleTypeUtils; import org.apache.dubbo.common.utils.PojoUtils; import org.apache.dubbo.common.utils.ReflectUtils; import org.apache.dubbo.common.utils.StringUtils; @@ -76,14 +75,11 @@ private static boolean isMatch(Class[] types, List args) { } if (ReflectUtils.isPrimitive(arg.getClass())) { + // allow string arg to enum type, @see PojoUtils.realize0() if (arg instanceof String && type.isEnum()) { - try { - CompatibleTypeUtils.compatibleTypeConvert(arg, type); - } catch (RuntimeException e) { - return false; - } continue; } + if (!ReflectUtils.isPrimitive(type)) { return false; }