* 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 nested property path");
}catch(IllegalAccessExceptione){
thrownewNullValueInNestedPathException(getRootClass(),this.nestedPath+name,"Could not instantiate propertyType ["+type.getName()+"] to auto-grow nested property path");
}
catch(Exceptionex){
thrownewNullValueInNestedPathException(getRootClass(),this.nestedPath+name,"Could not instantiate property type ["+type.getName()+"] to auto-grow nested property path: "+ex);
}
}
...
...
@@ -685,9 +678,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra