Skip to content

Commit eb5b147

Browse files
committed
Avoid ambiguous property warning for methods with multiple parameters
Issue: SPR-13349 (cherry picked from commit 42d5780)
1 parent 7491efa commit eb5b147

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -88,7 +88,8 @@ public GenericTypeAwarePropertyDescriptor(Class<?> beanClass, String propertyNam
8888
Set<Method> ambiguousCandidates = new HashSet<Method>();
8989
for (Method method : beanClass.getMethods()) {
9090
if (method.getName().equals(writeMethodToUse.getName()) &&
91-
!method.equals(writeMethodToUse) && !method.isBridge()) {
91+
!method.equals(writeMethodToUse) && !method.isBridge() &&
92+
method.getParameterTypes().length == writeMethodToUse.getParameterTypes().length) {
9293
ambiguousCandidates.add(method);
9394
}
9495
}

0 commit comments

Comments
 (0)