#1379 - Proper type resolution for CollectionModel post-processing.

CollectionModelProcessorWrapper erroneously returned a raw type in case a CollectionModel type assignment check failed which rendered the element type verification to always match as it's effectively compared against Object.

We're now returning null to rather proceed with the next candidate type.
This commit is contained in:
Oliver Drotbohm
2020-10-28 22:41:36 +01:00
parent 568d46e9ac
commit e2aa9126fa
2 changed files with 23 additions and 1 deletions

View File

@@ -429,6 +429,7 @@ public class RepresentationModelProcessorInvoker {
* @param superType must not be {@literal null}.
* @return
*/
@Nullable
private static ResolvableType getSuperType(ResolvableType source, Class<?> superType) {
Class<?> rawType = source.getRawClass();
@@ -449,7 +450,7 @@ public class RepresentationModelProcessorInvoker {
}
}
return ResolvableType.forClass(superType);
return null;
}
}