Skip to content

Commit 19384ac

Browse files
committed
Polishing
1 parent a0358a4 commit 19384ac

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ else if (methodName.startsWith("is") && method.getParameterCount() == 0 && metho
8888
BasicPropertyDescriptor pd = pdMap.get(propertyName);
8989
if (pd != null) {
9090
if (setter) {
91-
Method writedMethod = pd.getWriteMethod();
92-
if (writedMethod == null ||
93-
writedMethod.getParameterTypes()[0].isAssignableFrom(method.getParameterTypes()[0])) {
91+
Method writeMethod = pd.getWriteMethod();
92+
if (writeMethod == null ||
93+
writeMethod.getParameterTypes()[0].isAssignableFrom(method.getParameterTypes()[0])) {
9494
pd.setWriteMethod(method);
9595
}
9696
else {

spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,10 +853,12 @@ public void setConstructorArgumentValues(ConstructorArgumentValues constructorAr
853853
*/
854854
@Override
855855
public ConstructorArgumentValues getConstructorArgumentValues() {
856-
if (this.constructorArgumentValues == null) {
857-
this.constructorArgumentValues = new ConstructorArgumentValues();
856+
ConstructorArgumentValues cav = this.constructorArgumentValues;
857+
if (cav == null) {
858+
cav = new ConstructorArgumentValues();
859+
this.constructorArgumentValues = cav;
858860
}
859-
return this.constructorArgumentValues;
861+
return cav;
860862
}
861863

862864
/**

0 commit comments

Comments
 (0)