DATACMNS-867 - Second draft.
This commit is contained in:
@@ -107,11 +107,11 @@ class ProjectingMethodInterceptor implements MethodInterceptor {
|
||||
sources.size());
|
||||
|
||||
for (Object source : sources) {
|
||||
result.add(getProjection(source, type.getComponentType().getType()));
|
||||
result.add(getProjection(source, type.getRequiredComponentType().getType()));
|
||||
}
|
||||
|
||||
if (rawType.isArray()) {
|
||||
return result.toArray((Object[]) Array.newInstance(type.getComponentType().getType(), result.size()));
|
||||
return result.toArray((Object[]) Array.newInstance(type.getRequiredComponentType().getType(), result.size()));
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -130,7 +130,7 @@ class ProjectingMethodInterceptor implements MethodInterceptor {
|
||||
Map<Object, Object> result = CollectionFactory.createMap(type.getType(), sources.size());
|
||||
|
||||
for (Entry<?, ?> source : sources.entrySet()) {
|
||||
result.put(source.getKey(), getProjection(source.getValue(), type.getMapValueType().getType()));
|
||||
result.put(source.getKey(), getProjection(source.getValue(), type.getRequiredMapValueType().getType()));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -144,7 +144,7 @@ class ProxyProjectionFactory implements ProjectionFactory, ResourceLoaderAware,
|
||||
|
||||
Assert.notNull(projectionType, "Projection type must not be null!");
|
||||
|
||||
List<String> result = new ArrayList<String>();
|
||||
List<String> result = new ArrayList<>();
|
||||
|
||||
for (PropertyDescriptor descriptor : getProjectionInformation(projectionType).getInputProperties()) {
|
||||
result.add(descriptor.getName());
|
||||
|
||||
@@ -70,7 +70,7 @@ public class SpelAwareProxyProjectionFactory extends ProxyProjectionFactory impl
|
||||
|
||||
if (!typeCache.containsKey(projectionType)) {
|
||||
|
||||
AnnotationDetectionMethodCallback<Value> callback = new AnnotationDetectionMethodCallback<Value>(Value.class);
|
||||
AnnotationDetectionMethodCallback<Value> callback = new AnnotationDetectionMethodCallback<>(Value.class);
|
||||
ReflectionUtils.doWithMethods(projectionType, callback);
|
||||
|
||||
typeCache.put(projectionType, callback.hasFoundAnnotation());
|
||||
|
||||
Reference in New Issue
Block a user