DATACMNS-829 - Fixed handling of Map null values in ProxyProjectionFactory.

We now eagerly return null values in attempts to project Map values.
This commit is contained in:
Oliver Gierke
2016-03-14 15:46:40 +01:00
parent f8ea9fb8ab
commit a8db5e3d23
2 changed files with 24 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -137,7 +137,7 @@ class ProjectingMethodInterceptor implements MethodInterceptor {
}
private Object getProjection(Object result, Class<?> returnType) {
return ClassUtils.isAssignable(returnType, result.getClass()) ? result
return result == null || ClassUtils.isAssignable(returnType, result.getClass()) ? result
: factory.createProjection(returnType, result);
}