DATACMNS-1299 - QueryExecutionsConverters now don't unwrap custom Iterable implementations.
Instead of a simple check for assignability from Iterable, we now properly use TypeInformation.isCollectionLike(), which checks for Iterable equality or assignability of collections or arrays as well as an explicit check for Slice as that is needed to properly unwrap Page instances and Slices themselves. That prevents custom domain types implementing Iterable from being unwrapped into their element types.
This commit is contained in:
@@ -300,7 +300,8 @@ public abstract class QueryExecutionConverters {
|
||||
|
||||
Class<?> rawType = type.getType();
|
||||
|
||||
boolean needToUnwrap = Iterable.class.isAssignableFrom(rawType) //
|
||||
boolean needToUnwrap = type.isCollectionLike() //
|
||||
|| Slice.class.isAssignableFrom(rawType) //
|
||||
|| rawType.isArray() //
|
||||
|| supports(rawType) //
|
||||
|| Stream.class.isAssignableFrom(rawType);
|
||||
|
||||
Reference in New Issue
Block a user