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

@@ -224,8 +224,8 @@ public abstract class AopProxyUtils {
return new Object[0];
}
if (method.isVarArgs()) {
Class<?>[] paramTypes = method.getParameterTypes();
if (paramTypes.length == arguments.length) {
if (method.getParameterCount() == arguments.length) {
Class<?>[] paramTypes = method.getParameterTypes();
int varargIndex = paramTypes.length - 1;
Class<?> varargType = paramTypes[varargIndex];
if (varargType.isArray()) {