Merge BeanWrapperImpl and DirectFieldAccessor

`BeanWrapperImpl` and `DirectFieldAccessor` are two
`ConfigurablePropertyAccessor` implementations with different features
set.

This commit harmonizes the two implementations to use a common base class
that delegates the actual property handling to the sub-classes:

* `BeanWrapperImpl`:  `PropertyDescriptor` and introspection utilities
* `DirectFieldAccessor`: reflection on `java.lang.Field`

Issues: SPR-12206 - SPR-12805
This commit is contained in:
Stephane Nicoll
2015-04-20 08:39:28 +02:00
parent ad4c8795ae
commit 3d86f15a84
10 changed files with 3161 additions and 3227 deletions

View File

@@ -345,11 +345,11 @@ public class WebRequestDataBinderTests {
static class TestBeanWithConcreteSpouse extends TestBean {
public void setConcreteSpouse(TestBean spouse) {
this.spouses = new ITestBean[] {spouse};
setSpouse(spouse);
}
public TestBean getConcreteSpouse() {
return (spouses != null ? (TestBean) spouses[0] : null);
return (TestBean) getSpouse();
}
}