Closed
Description
Oliver Drotbohm opened SPR-14648 and commented
This test case fails for me and I think it shouldn't as a concrete generic type should always be assignable to a raw variant of it:
public class RawTypeAssignmentTests {
@Test
public void rawTypeShouldBeassignable() throws Exception {
// That works.
Collection value = someMethod();
// So that should, too.
ResolvableType fromClass = ResolvableType.forClass(Collection.class);
ResolvableType fromReturnType = ResolvableType.forMethodReturnType(RawTypeAssignmentTests.class.getMethod("someMethod"));
assertThat(fromClass.isAssignableFrom(fromReturnType), is(true));
}
public Collection<?> someMethod() {
return Collections.emptyList();
}
}
Affects: 4.2.7, 4.3.2, 5.0 M1
Issue Links:
- DATAREST-881 ResourceProcessor is not invoked if RepositoryEntityController does not return a subtype of Resources ("is depended on by")
Backported to: 4.2.8