renamed to MappingContext since no spel dep
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2064 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
5415ff882f
commit
a4bbec9726
|
|
@ -46,7 +46,7 @@ public class MapperConverter implements GenericConverter {
|
|||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
if (SpelMappingContextHolder.contains(source)) {
|
||||
if (MappingContextHolder.contains(source)) {
|
||||
return source;
|
||||
}
|
||||
if (sourceType.isAssignableTo(targetType) && isCopyByReference(sourceType, targetType)) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import java.util.Stack;
|
|||
|
||||
import org.springframework.core.NamedThreadLocal;
|
||||
|
||||
class SpelMappingContextHolder {
|
||||
class MappingContextHolder {
|
||||
|
||||
private static final ThreadLocal<Stack<Object>> mappingContextHolder = new NamedThreadLocal<Stack<Object>>(
|
||||
"Mapping context");
|
||||
|
|
@ -97,7 +97,7 @@ public class SpelMapper implements Mapper<Object, Object> {
|
|||
|
||||
public Object map(Object source, Object target) {
|
||||
try {
|
||||
SpelMappingContextHolder.push(source);
|
||||
MappingContextHolder.push(source);
|
||||
EvaluationContext sourceContext = getEvaluationContext(source);
|
||||
EvaluationContext targetContext = getEvaluationContext(target);
|
||||
List<MappingFailure> failures = new LinkedList<MappingFailure>();
|
||||
|
|
@ -113,7 +113,7 @@ public class SpelMapper implements Mapper<Object, Object> {
|
|||
}
|
||||
return target;
|
||||
} finally {
|
||||
SpelMappingContextHolder.pop();
|
||||
MappingContextHolder.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ public class SpelMapper implements Mapper<Object, Object> {
|
|||
private void doMap(SpelMapping mapping, EvaluationContext sourceContext, EvaluationContext targetContext,
|
||||
List<MappingFailure> failures) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(SpelMappingContextHolder.getLevel() + mapping);
|
||||
logger.debug(MappingContextHolder.getLevel() + mapping);
|
||||
}
|
||||
mapping.map(sourceContext, targetContext, failures);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue