fixed potential InjectionMetadata NPE when using SpringBeanAutowiringInterceptor (SPR-7686)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2010 the original author or authors.
|
* Copyright 2002-2011 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -168,21 +168,23 @@ public class InjectionMetadata {
|
|||||||
*/
|
*/
|
||||||
protected boolean checkPropertySkipping(PropertyValues pvs) {
|
protected boolean checkPropertySkipping(PropertyValues pvs) {
|
||||||
if (this.skip == null) {
|
if (this.skip == null) {
|
||||||
synchronized (pvs) {
|
if (pvs != null) {
|
||||||
if (this.skip == null) {
|
synchronized (pvs) {
|
||||||
if (this.pd != null && pvs != null) {
|
if (this.skip == null) {
|
||||||
if (pvs.contains(this.pd.getName())) {
|
if (this.pd != null) {
|
||||||
// Explicit value provided as part of the bean definition.
|
if (pvs.contains(this.pd.getName())) {
|
||||||
this.skip = true;
|
// Explicit value provided as part of the bean definition.
|
||||||
return true;
|
this.skip = true;
|
||||||
}
|
return true;
|
||||||
else if (pvs instanceof MutablePropertyValues) {
|
}
|
||||||
((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName());
|
else if (pvs instanceof MutablePropertyValues) {
|
||||||
|
((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.skip = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.skip = false;
|
||||||
}
|
}
|
||||||
return this.skip;
|
return this.skip;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user