11/*
2- * Copyright 2012-2020 the original author or authors.
2+ * Copyright 2012-2025 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
5757import org .springframework .expression .ExpressionParser ;
5858import org .springframework .expression .ParseException ;
5959import org .springframework .expression .spel .standard .SpelExpressionParser ;
60- import org .springframework .expression .spel .support .StandardEvaluationContext ;
6160import org .springframework .util .ReflectionUtils ;
6261import org .springframework .util .StringUtils ;
6362
6766 * </p>
6867 *
6968 * @author Dave Syer
69+ * @author Yanming Zhou
7070 * @since 3.1
7171 *
7272 */
@@ -81,13 +81,11 @@ public class GenericScope
8181
8282 private ConfigurableListableBeanFactory beanFactory ;
8383
84- private StandardEvaluationContext evaluationContext ;
85-
8684 private String id ;
8785
88- private Map <String , Exception > errors = new ConcurrentHashMap <>();
86+ private final Map <String , Exception > errors = new ConcurrentHashMap <>();
8987
90- private ConcurrentMap <String , ReadWriteLock > locks = new ConcurrentHashMap <>();
88+ private final ConcurrentMap <String , ReadWriteLock > locks = new ConcurrentHashMap <>();
9189
9290 static RuntimeException wrapIfNecessary (Throwable throwable ) {
9391 if (throwable instanceof RuntimeException ) {
@@ -213,7 +211,7 @@ public Object remove(String name) {
213211 @ Override
214212 public Object resolveContextualObject (String key ) {
215213 Expression expression = parseExpression (key );
216- return expression .getValue (this .evaluationContext , this . beanFactory );
214+ return expression .getValue (this .beanFactory );
217215 }
218216
219217 private Expression parseExpression (String input ) {
0 commit comments