Add additional test for SPR-16210
Issue: SPR-16210
This commit is contained in:
@@ -64,6 +64,7 @@ import static org.mockito.BDDMockito.*;
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Juergen Hoeller
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
@@ -261,6 +262,19 @@ public class ResolvableTypeTests {
|
||||
ResolvableType.forMethodParameter(null);
|
||||
}
|
||||
|
||||
@Test // SPR-16210
|
||||
public void forMethodParameterWithSameSignatureAndGenerics() throws Exception {
|
||||
Method method = Methods.class.getMethod("list1");
|
||||
MethodParameter methodParameter = MethodParameter.forExecutable(method, -1);
|
||||
ResolvableType type = ResolvableType.forMethodParameter(methodParameter);
|
||||
assertThat(((MethodParameter)type.getSource()).getMethod(), equalTo(method));
|
||||
|
||||
method = Methods.class.getMethod("list2");
|
||||
methodParameter = MethodParameter.forExecutable(method, -1);
|
||||
type = ResolvableType.forMethodParameter(methodParameter);
|
||||
assertThat(((MethodParameter)type.getSource()).getMethod(), equalTo(method));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forMethodReturn() throws Exception {
|
||||
Method method = Methods.class.getMethod("charSequenceReturn");
|
||||
@@ -1439,6 +1453,10 @@ public class ResolvableTypeTests {
|
||||
T typedReturn();
|
||||
|
||||
Set<?> wildcardSet();
|
||||
|
||||
List<String> list1();
|
||||
|
||||
List<String> list2();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user