* If this BeanWrapper should attempt to "autogrow" a nested path that contains a null value.
* If true, a null path location will be populated with a default object value and traversed instead of resulting in a {@link NullValueInNestedPathException}.
* Turning this flag on also enables auto-growth of collection elements when an index that is out of bounds is accessed.
*/
publicbooleangetAutoGrowNestedPaths(){
returnthis.autoGrowNestedPaths;
}
/**
* Sets if this BeanWrapper should attempt to "autogrow" a nested path that contains a null value.
* If true, a null path location will be populated with a default object value and traversed instead of resulting in a {@link NullValueInNestedPathException}.
* Turning this flag on also enables auto-growth of collection elements when an index that is out of bounds is accessed.
thrownewNullValueInNestedPathException(getRootClass(),this.nestedPath+name,"Could not instantiate propertyType ["+type.getName()+"] to auto-grow nestd property path");
}catch(IllegalAccessExceptione){
thrownewNullValueInNestedPathException(getRootClass(),this.nestedPath+name,"Could not instantiate propertyType ["+type.getName()+"] to auto-grow nested property path");
}
}
/**
/**
* Create a new nested BeanWrapper instance.
* Create a new nested BeanWrapper instance.
* <p>Default implementation creates a BeanWrapperImpl instance.
* <p>Default implementation creates a BeanWrapperImpl instance.
...
@@ -611,22 +682,36 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
...
@@ -611,22 +682,36 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra