parent
646fcc5c2f
commit
3f3141cdda
|
|
@ -64,6 +64,7 @@ import static org.mockito.BDDMockito.*;
|
||||||
*
|
*
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@RunWith(MockitoJUnitRunner.class)
|
@RunWith(MockitoJUnitRunner.class)
|
||||||
|
|
@ -261,6 +262,19 @@ public class ResolvableTypeTests {
|
||||||
ResolvableType.forMethodParameter(null);
|
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
|
@Test
|
||||||
public void forMethodReturn() throws Exception {
|
public void forMethodReturn() throws Exception {
|
||||||
Method method = Methods.class.getMethod("charSequenceReturn");
|
Method method = Methods.class.getMethod("charSequenceReturn");
|
||||||
|
|
@ -1439,6 +1453,10 @@ public class ResolvableTypeTests {
|
||||||
T typedReturn();
|
T typedReturn();
|
||||||
|
|
||||||
Set<?> wildcardSet();
|
Set<?> wildcardSet();
|
||||||
|
|
||||||
|
List<String> list1();
|
||||||
|
|
||||||
|
List<String> list2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue