Use Method::getParameterCount where possible

This commit is contained in:
stsypanov
2019-11-07 17:52:01 +02:00
committed by Juergen Hoeller
parent 55f3f128c9
commit f5ae3c77c6
14 changed files with 68 additions and 46 deletions

View File

@@ -231,6 +231,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
for (Class<?> ifc : ifaces) {
for (Method ifcMethod : ifc.getMethods()) {
if (ifcMethod.getName().equals(method.getName()) &&
ifcMethod.getParameterCount() == method.getParameterCount() &&
Arrays.equals(ifcMethod.getParameterTypes(), method.getParameterTypes())) {
return true;
}