Use ResolvableType to back TypeInformation.
Reworked the implementation of the TypeInformation type hierarchy to be based on Spring's ResolvableType for most of the heavy-lifting. Original pull request: #2572. Related ticket: #2312.
This commit is contained in:
committed by
Oliver Drotbohm
parent
8721ab4170
commit
1d6331ccb6
@@ -146,7 +146,7 @@ public class JsonProjectingMethodInterceptorFactory implements MethodInterceptor
|
||||
public Object invoke(MethodInvocation invocation) throws Throwable {
|
||||
|
||||
Method method = invocation.getMethod();
|
||||
TypeInformation<Object> returnType = ClassTypeInformation.fromReturnTypeOf(method);
|
||||
TypeInformation<?> returnType = ClassTypeInformation.fromReturnTypeOf(method);
|
||||
ResolvableType type = ResolvableType.forMethodReturnType(method);
|
||||
boolean isCollectionResult = Collection.class.isAssignableFrom(type.getRawClass());
|
||||
type = isCollectionResult ? type : ResolvableType.forClassWithGenerics(List.class, type);
|
||||
|
||||
Reference in New Issue
Block a user