Add fast path for ClassUtils.hasMethod()
This commit is contained in:
committed by
Juergen Hoeller
parent
c562c3a0b3
commit
8e5cad2af3
@@ -207,7 +207,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
|
||||
* configured interfaces and is public, otherwise {@code false}.
|
||||
*/
|
||||
private boolean isPublicInInterface(Method method, String beanKey) {
|
||||
return ((method.getModifiers() & Modifier.PUBLIC) > 0) && isDeclaredInInterface(method, beanKey);
|
||||
return Modifier.isPublic(method.getModifiers()) && isDeclaredInInterface(method, beanKey);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -145,7 +145,7 @@ public class MethodValidationInterceptor implements MethodInterceptor {
|
||||
factoryBeanType = FactoryBean.class;
|
||||
}
|
||||
return (factoryBeanType != null && !method.getName().equals("getObject") &&
|
||||
ClassUtils.hasMethod(factoryBeanType, method.getName(), method.getParameterTypes()));
|
||||
ClassUtils.hasMethod(factoryBeanType, method));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user