|
1 | 1 | /* |
2 | | - * Copyright 2002-2009 the original author or authors. |
| 2 | + * Copyright 2002-2010 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
38 | 38 |
|
39 | 39 | import org.springframework.beans.BeanUtils; |
40 | 40 | import org.springframework.beans.BeansException; |
41 | | -import org.springframework.beans.MutablePropertyValues; |
42 | 41 | import org.springframework.beans.PropertyValues; |
43 | 42 | import org.springframework.beans.TypeConverter; |
44 | 43 | import org.springframework.beans.factory.BeanCreationException; |
@@ -528,11 +527,10 @@ public AutowiredMethodElement(Method method, boolean required, PropertyDescripto |
528 | 527 |
|
529 | 528 | @Override |
530 | 529 | protected void inject(Object bean, String beanName, PropertyValues pvs) throws Throwable { |
531 | | - if (this.skip == null && this.pd != null && pvs != null && pvs.contains(this.pd.getName())) { |
532 | | - // Explicit value provided as part of the bean definition. |
533 | | - this.skip = Boolean.TRUE; |
| 530 | + if (this.skip == null) { |
| 531 | + this.skip = checkPropertySkipping(pvs); |
534 | 532 | } |
535 | | - if (this.skip != null && this.skip) { |
| 533 | + if (this.skip) { |
536 | 534 | return; |
537 | 535 | } |
538 | 536 | Method method = (Method) this.member; |
@@ -590,12 +588,6 @@ protected void inject(Object bean, String beanName, PropertyValues pvs) throws T |
590 | 588 | } |
591 | 589 | } |
592 | 590 | } |
593 | | - if (this.skip == null) { |
594 | | - if (this.pd != null && pvs instanceof MutablePropertyValues) { |
595 | | - ((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName()); |
596 | | - } |
597 | | - this.skip = Boolean.FALSE; |
598 | | - } |
599 | 591 | if (arguments != null) { |
600 | 592 | ReflectionUtils.makeAccessible(method); |
601 | 593 | method.invoke(bean, arguments); |
|
0 commit comments