Skip to content

Commit 09c8586

Browse files
committed
Polishing
1 parent 8212151 commit 09c8586

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -212,10 +212,12 @@ public Class<?>[] getParameterTypes() {
212212

213213
@Override
214214
public String[] getParameterNames() {
215-
if (this.parameterNames == null) {
216-
this.parameterNames = parameterNameDiscoverer.getParameterNames(getMethod());
215+
String[] parameterNames = this.parameterNames;
216+
if (parameterNames == null) {
217+
parameterNames = parameterNameDiscoverer.getParameterNames(getMethod());
218+
this.parameterNames = parameterNames;
217219
}
218-
return this.parameterNames;
220+
return parameterNames;
219221
}
220222

221223
@Override

spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -69,7 +69,7 @@ public class BeanWrapperImpl extends AbstractNestablePropertyAccessor implements
6969
private CachedIntrospectionResults cachedIntrospectionResults;
7070

7171
/**
72-
* The security context used for invoking the property methods
72+
* The security context used for invoking the property methods.
7373
*/
7474
private AccessControlContext acc;
7575

@@ -95,7 +95,7 @@ public BeanWrapperImpl(boolean registerDefaultEditors) {
9595

9696
/**
9797
* Create a new BeanWrapperImpl for the given object.
98-
* @param object object wrapped by this BeanWrapper
98+
* @param object the object wrapped by this BeanWrapper
9999
*/
100100
public BeanWrapperImpl(Object object) {
101101
super(object);
@@ -112,7 +112,7 @@ public BeanWrapperImpl(Class<?> clazz) {
112112
/**
113113
* Create a new BeanWrapperImpl for the given object,
114114
* registering a nested path that the object is in.
115-
* @param object object wrapped by this BeanWrapper
115+
* @param object the object wrapped by this BeanWrapper
116116
* @param nestedPath the nested path of the object
117117
* @param rootObject the root object at the top of the path
118118
*/
@@ -123,7 +123,7 @@ public BeanWrapperImpl(Object object, String nestedPath, Object rootObject) {
123123
/**
124124
* Create a new BeanWrapperImpl for the given object,
125125
* registering a nested path that the object is in.
126-
* @param object object wrapped by this BeanWrapper
126+
* @param object the object wrapped by this BeanWrapper
127127
* @param nestedPath the nested path of the object
128128
* @param parent the containing BeanWrapper (must not be {@code null})
129129
*/
@@ -164,7 +164,7 @@ protected void setIntrospectionClass(Class<?> clazz) {
164164
}
165165

166166
/**
167-
* Obtain a lazily initializted CachedIntrospectionResults instance
167+
* Obtain a lazily initialized CachedIntrospectionResults instance
168168
* for the wrapped object.
169169
*/
170170
private CachedIntrospectionResults getCachedIntrospectionResults() {

spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -51,7 +51,7 @@ public class DirectFieldAccessor extends AbstractNestablePropertyAccessor {
5151

5252
/**
5353
* Create a new DirectFieldAccessor for the given object.
54-
* @param object object wrapped by this DirectFieldAccessor
54+
* @param object the object wrapped by this DirectFieldAccessor
5555
*/
5656
public DirectFieldAccessor(Object object) {
5757
super(object);
@@ -60,7 +60,7 @@ public DirectFieldAccessor(Object object) {
6060
/**
6161
* Create a new DirectFieldAccessor for the given object,
6262
* registering a nested path that the object is in.
63-
* @param object object wrapped by this DirectFieldAccessor
63+
* @param object the object wrapped by this DirectFieldAccessor
6464
* @param nestedPath the nested path of the object
6565
* @param parent the containing DirectFieldAccessor (must not be {@code null})
6666
*/
@@ -90,8 +90,7 @@ protected DirectFieldAccessor newNestedPropertyAccessor(Object object, String ne
9090
@Override
9191
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
9292
PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass());
93-
throw new NotWritablePropertyException(
94-
getRootClass(), getNestedPath() + propertyName,
93+
throw new NotWritablePropertyException(getRootClass(), getNestedPath() + propertyName,
9594
matches.buildErrorMessage(), matches.getPossibleMatches());
9695
}
9796

0 commit comments

Comments
 (0)