Polishing

This commit is contained in:
Juergen Hoeller
2018-03-14 17:24:58 +01:00
parent 356ef45e99
commit 3988dd9ebb
4 changed files with 36 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -64,8 +64,7 @@ public class StandardBeanExpressionResolver implements BeanExpressionResolver {
private final Map<String, Expression> expressionCache = new ConcurrentHashMap<>(256);
private final Map<BeanExpressionContext, StandardEvaluationContext> evaluationCache =
new ConcurrentHashMap<>(8);
private final Map<BeanExpressionContext, StandardEvaluationContext> evaluationCache = new ConcurrentHashMap<>(8);
private final ParserContext beanExpressionParserContext = new ParserContext() {
@Override
@@ -145,8 +144,7 @@ public class StandardBeanExpressionResolver implements BeanExpressionResolver {
}
StandardEvaluationContext sec = this.evaluationCache.get(evalContext);
if (sec == null) {
sec = new StandardEvaluationContext();
sec.setRootObject(evalContext);
sec = new StandardEvaluationContext(evalContext);
sec.addPropertyAccessor(new BeanExpressionContextAccessor());
sec.addPropertyAccessor(new BeanFactoryAccessor());
sec.addPropertyAccessor(new MapAccessor());