Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance org.apache.dubbo.rpc.protocol.dubbo.telnet.InvokeTelnetHandler#isMatch #2941

Merged
merged 2 commits into from
Dec 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -76,14 +75,11 @@ private static boolean isMatch(Class<?>[] types, List<Object> 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;
}
Expand Down