diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java index 471647f89cf..d1c4db25c28 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 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. @@ -219,10 +219,12 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @Override @Nullable public String[] getParameterNames() { - if (this.parameterNames == null) { - this.parameterNames = parameterNameDiscoverer.getParameterNames(getMethod()); + String[] parameterNames = this.parameterNames; + if (parameterNames == null) { + parameterNames = parameterNameDiscoverer.getParameterNames(getMethod()); + this.parameterNames = parameterNames; } - return this.parameterNames; + return parameterNames; } @Override diff --git a/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java b/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java index f526ab3cdcf..a98c6eb41b0 100644 --- a/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 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. @@ -52,7 +52,7 @@ public class DirectFieldAccessor extends AbstractNestablePropertyAccessor { /** * Create a new DirectFieldAccessor for the given object. - * @param object object wrapped by this DirectFieldAccessor + * @param object the object wrapped by this DirectFieldAccessor */ public DirectFieldAccessor(Object object) { super(object); @@ -61,7 +61,7 @@ public class DirectFieldAccessor extends AbstractNestablePropertyAccessor { /** * Create a new DirectFieldAccessor for the given object, * registering a nested path that the object is in. - * @param object object wrapped by this DirectFieldAccessor + * @param object the object wrapped by this DirectFieldAccessor * @param nestedPath the nested path of the object * @param parent the containing DirectFieldAccessor (must not be {@code null}) */ @@ -92,8 +92,7 @@ public class DirectFieldAccessor extends AbstractNestablePropertyAccessor { @Override protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) { PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass()); - throw new NotWritablePropertyException( - getRootClass(), getNestedPath() + propertyName, + throw new NotWritablePropertyException(getRootClass(), getNestedPath() + propertyName, matches.buildErrorMessage(), matches.getPossibleMatches()); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelCompiler.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelCompiler.java index 501f7c7e39f..847da65a735 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelCompiler.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelCompiler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 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. @@ -63,18 +63,20 @@ import org.springframework.util.StringUtils; *
Individual expressions can be compiled by calling {@code SpelCompiler.compile(expression)}.
*
* @author Andy Clement
+ * @author Juergen Hoeller
* @since 4.1
*/
public final class SpelCompiler implements Opcodes {
- private static final Log logger = LogFactory.getLog(SpelCompiler.class);
-
private static final int CLASSES_DEFINED_LIMIT = 100;
+ private static final Log logger = LogFactory.getLog(SpelCompiler.class);
+
// A compiler is created for each classloader, it manages a child class loader of that
// classloader and the child is used to load the compiled expressions.
private static final Map