DATACMNS-956 - Ensure consistent use of ClassTypeInformation.from(…).
This commit is contained in:
@@ -92,7 +92,8 @@ public class ClassTypeInformation<S> extends TypeDiscoverer<S> {
|
||||
public static <S> TypeInformation<S> fromReturnTypeOf(Method method) {
|
||||
|
||||
Assert.notNull(method, "Method must not be null!");
|
||||
return new ClassTypeInformation(method.getDeclaringClass()).createInfo(method.getGenericReturnType());
|
||||
return (TypeInformation<S>) ClassTypeInformation.from(method.getDeclaringClass())
|
||||
.createInfo(method.getGenericReturnType());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -103,7 +103,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
|
||||
}
|
||||
|
||||
if (fieldType instanceof Class) {
|
||||
return new ClassTypeInformation((Class<?>) fieldType);
|
||||
return ClassTypeInformation.from((Class<?>) fieldType);
|
||||
}
|
||||
|
||||
Class<S> resolveType = resolveType(fieldType);
|
||||
|
||||
Reference in New Issue
Block a user