Java 8 getParameterCount() instead of getParameterTypes().length

Issue: SPR-13188
This commit is contained in:
Juergen Hoeller
2016-07-07 01:04:24 +02:00
parent 39e3f2ebf6
commit a1f5fb53db
38 changed files with 68 additions and 68 deletions

View File

@@ -437,7 +437,7 @@ public class PersistenceAnnotationBeanPostProcessor
if (Modifier.isStatic(method.getModifiers())) {
throw new IllegalStateException("Persistence annotations are not supported on static methods");
}
if (method.getParameterTypes().length != 1) {
if (method.getParameterCount() != 1) {
throw new IllegalStateException("Persistence annotation requires a single-arg method: " + method);
}
PropertyDescriptor pd = BeanUtils.findPropertyForMethod(bridgedMethod, clazz);