@ -139,40 +139,35 @@ public class GenericTypeResolverTests {
@@ -139,40 +139,35 @@ public class GenericTypeResolverTests {
assertThat ( x , equalTo ( ( Type ) Long . class ) ) ;
}
@Test
@Test // SPR-11030
public void getGenericsCannotBeResolved ( ) throws Exception {
// SPR-11030
Class < ? > [ ] resolved = GenericTypeResolver . resolveTypeArguments ( List . class , Iterable . class ) ;
assertNull ( resolved ) ;
}
@Test
@Test // SPR-11052
public void getRawMapTypeCannotBeResolved ( ) throws Exception {
// SPR-11052
Class < ? > [ ] resolved = GenericTypeResolver . resolveTypeArguments ( Map . class , Map . class ) ;
assertNull ( resolved ) ;
}
@Test
@Test // SPR-11044
public void getGenericsOnArrayFromParamCannotBeResolved ( ) throws Exception {
// SPR-11044
MethodParameter methodParameter = MethodParameter . forExecutable (
WithArrayBase . class . getDeclaredMethod ( "array" , Object [ ] . class ) , 0 ) ;
Class < ? > resolved = GenericTypeResolver . resolveParameterType ( methodParameter , WithArray . class ) ;
assertThat ( resolved , equalTo ( ( Class < ? > ) Object [ ] . class ) ) ;
}
@Test
@Test // SPR-11044
public void getGenericsOnArrayFromReturnCannotBeResolved ( ) throws Exception {
// SPR-11044
Class < ? > resolved = GenericTypeResolver . resolveReturnType (
WithArrayBase . class . getDeclaredMethod ( "array" , Object [ ] . class ) , WithArray . class ) ;
assertThat ( resolved , equalTo ( ( Class < ? > ) Object [ ] . class ) ) ;
}
@Test
@Test // SPR-11763
public void resolveIncompleteTypeVariables ( ) {
// SPR-11763
Class < ? > [ ] resolved = GenericTypeResolver . resolveTypeArguments ( IdFixingRepository . class , Repository . class ) ;
assertNotNull ( resolved ) ;
assertEquals ( 2 , resolved . length ) ;