DATACMNS-501 - Work around potential null returned from GenericTypeResolver in Spring 4.
Spring 4's GenericTypeResolver returns null when trying to resolve type arguments for types that do not fully resolve the generic types. Related issues: SPR-11763.
This commit is contained in:
@@ -129,6 +129,18 @@ public class DefaultRepositoryMetadataUnitTests {
|
||||
assertThat(metadata.getReturnedDomainClass(method), is(typeCompatibleWith(User.class)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-501
|
||||
*/
|
||||
@Test
|
||||
public void discoversDomainAndIdTypeForIntermediateRepository() {
|
||||
|
||||
RepositoryMetadata metadata = new DefaultRepositoryMetadata(IdTypeFixingRepository.class);
|
||||
|
||||
assertThat(metadata.getDomainType(), is(typeCompatibleWith(Object.class)));
|
||||
assertThat(metadata.getIdType(), is(typeCompatibleWith(Long.class)));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private class User {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user