Hi,
I am using the BeanWrapperFieldSetMapper, to convert the file content to Object. If I have the below class structure
When feeding the file for Object B using BeanWrapperFieldSetMapper below line of codeCode:public class A{ int attrA1; int attrA2; } public class B{ A classAinst; }
creates only object B with null instance of A. This throws an NullPointerException.Code:public Object mapLine(FieldSet fs) { Object copy = getBean();
Question: Is this an bug in the code or there is a way to handle it. Instantiating the classAinst in the constructor B is not an option as Class B is also used by UI/core business classes.
Your answer to this question is much appreciated. Thanks in advance for your help.
Thanks,
vbforums


Reply With Quote
