BeanWrapperImpl.setBeanInstance correctly exposes root object

Issue: SPR-14474
This commit is contained in:
Juergen Hoeller 2016-07-20 18:02:23 +02:00
parent 3a4e5d5da8
commit 938b56c0fe
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA
private String nestedPath = "";
private Object rootObject;
Object rootObject;
/**
* Map with cached nested Accessors: nested path -> Accessor instance.

View File

@ -141,6 +141,7 @@ public class BeanWrapperImpl extends AbstractNestablePropertyAccessor implements
*/
public void setBeanInstance(Object object) {
this.wrappedObject = object;
this.rootObject = object;
this.typeConverterDelegate = new TypeConverterDelegate(this, this.wrappedObject);
setIntrospectionClass(object.getClass());
}