You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Ifdevil (GitHub)" <gi...@apache.org> on 2019/04/04 07:57:32 UTC
[GitHub] [incubator-dubbo] Ifdevil commented on issue #3795: Found
hard code Strings, which should be replace by constants.
In the Wrapper Class has same issue ,like:
private static final String[] OBJECT_METHODS = new String[]{"getClass", "hashCode", "toString", "equals"};
if ("getClass".equals(mn)) {
return instance.getClass();
}
if ("hashCode".equals(mn)) {
return instance.hashCode();
}
if ("toString".equals(mn)) {
return instance.toString();
}
if ("equals".equals(mn)) {
if (args.length == 1) {
return instance.equals(args[0]);
}
throw new IllegalArgumentException("Invoke method [" + mn + "] argument number error.");
}
Maybe these can be replaced by OBJECT_METHODS[i]?
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3795 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org