From f38068923014e6a1abedcff5df1860d94c832717 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 23 May 2015 18:18:03 +0200 Subject: [PATCH] Don't use Java 8's Method.getParameterCount() --- .../annotation/SynthesizedAnnotationInvocationHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java b/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java index 2491255cc7..6bb53c23f2 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java @@ -67,7 +67,8 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); - int parameterCount = method.getParameterCount(); + Class[] parameterTypes = method.getParameterTypes(); + int parameterCount = parameterTypes.length; if ("toString".equals(methodName) && (parameterCount == 0)) { return toString(proxy);