diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java b/spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java index 1834cd5d27e0..2faf87e0e3c0 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java @@ -88,9 +88,9 @@ else if (methodName.startsWith("is") && method.getParameterCount() == 0 && metho BasicPropertyDescriptor pd = pdMap.get(propertyName); if (pd != null) { if (setter) { - Method writedMethod = pd.getWriteMethod(); - if (writedMethod == null || - writedMethod.getParameterTypes()[0].isAssignableFrom(method.getParameterTypes()[0])) { + Method writeMethod = pd.getWriteMethod(); + if (writeMethod == null || + writeMethod.getParameterTypes()[0].isAssignableFrom(method.getParameterTypes()[0])) { pd.setWriteMethod(method); } else { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java index e244edda077c..5e049f8d2b09 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java @@ -853,10 +853,12 @@ public void setConstructorArgumentValues(ConstructorArgumentValues constructorAr */ @Override public ConstructorArgumentValues getConstructorArgumentValues() { - if (this.constructorArgumentValues == null) { - this.constructorArgumentValues = new ConstructorArgumentValues(); + ConstructorArgumentValues cav = this.constructorArgumentValues; + if (cav == null) { + cav = new ConstructorArgumentValues(); + this.constructorArgumentValues = cav; } - return this.constructorArgumentValues; + return cav; } /**