first bunch of backports from 3.1 M2 to 3.0.6
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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -168,21 +168,23 @@ public class InjectionMetadata {
|
||||
*/
|
||||
protected boolean checkPropertySkipping(PropertyValues pvs) {
|
||||
if (this.skip == null) {
|
||||
synchronized (pvs) {
|
||||
if (this.skip == null) {
|
||||
if (this.pd != null && pvs != null) {
|
||||
if (pvs.contains(this.pd.getName())) {
|
||||
// Explicit value provided as part of the bean definition.
|
||||
this.skip = true;
|
||||
return true;
|
||||
}
|
||||
else if (pvs instanceof MutablePropertyValues) {
|
||||
((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName());
|
||||
if (pvs != null) {
|
||||
synchronized (pvs) {
|
||||
if (this.skip == null) {
|
||||
if (this.pd != null) {
|
||||
if (pvs.contains(this.pd.getName())) {
|
||||
// Explicit value provided as part of the bean definition.
|
||||
this.skip = true;
|
||||
return true;
|
||||
}
|
||||
else if (pvs instanceof MutablePropertyValues) {
|
||||
((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
this.skip = false;
|
||||
}
|
||||
}
|
||||
this.skip = false;
|
||||
}
|
||||
return this.skip;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -115,7 +115,7 @@ public class BeanDefinitionVisitor {
|
||||
}
|
||||
|
||||
protected void visitFactoryMethodName(BeanDefinition beanDefinition) {
|
||||
String factoryMethodName = beanDefinition.getFactoryBeanName();
|
||||
String factoryMethodName = beanDefinition.getFactoryMethodName();
|
||||
if (factoryMethodName != null) {
|
||||
String resolvedName = resolveStringValue(factoryMethodName);
|
||||
if (!factoryMethodName.equals(resolvedName)) {
|
||||
|
||||
@@ -567,7 +567,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class predictBeanType(String beanName, RootBeanDefinition mbd, Class[] typesToMatch) {
|
||||
protected Class predictBeanType(String beanName, RootBeanDefinition mbd, Class... typesToMatch) {
|
||||
Class beanClass;
|
||||
if (mbd.getFactoryMethodName() != null) {
|
||||
beanClass = getTypeForFactoryMethod(beanName, mbd, typesToMatch);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2011 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.
|
||||
@@ -77,7 +77,10 @@ public class CustomDateEditor extends PropertyEditorSupport {
|
||||
* thrown if the String does not exactly match the length specified. This is useful
|
||||
* because SimpleDateFormat does not enforce strict parsing of the year part,
|
||||
* not even with <code>setLenient(false)</code>. Without an "exactDateLength"
|
||||
* specified, the "01/01/05" would get parsed to "01/01/0005".
|
||||
* specified, the "01/01/05" would get parsed to "01/01/0005". However, even
|
||||
* with an "exactDateLength" specified, prepended zeros in the day or month
|
||||
* part may still allow for a shorter year part, so consider this as just
|
||||
* one more assertion that gets you closer to the intended date format.
|
||||
* @param dateFormat DateFormat to use for parsing and rendering
|
||||
* @param allowEmpty if empty strings should be allowed
|
||||
* @param exactDateLength the exact expected length of the date String
|
||||
|
||||
Reference in New Issue
Block a user