pradeepsjsu / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

NullPointer in fixedlength with field igore=true #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define <stream name="employeeFile" format="fixedlength">
2. Define <field name="firstName" length="10" ignore="true" />
3.

What is the expected output? What do you see instead?
Exception in thread "main" java.lang.NullPointerException
    at org.beanio.parser.fixedlength.FixedLengthFieldDefinition.parseField(FixedLengthFieldDefinition.java:61)
    at org.beanio.parser.FieldDefinition.parsePropertyValue(FieldDefinition.java:128)
    at org.beanio.parser.PropertyDefinition.parseValue(PropertyDefinition.java:102)
    at org.beanio.parser.BeanDefinition.parsePropertyValue(BeanDefinition.java:80)
    at org.beanio.parser.PropertyDefinition.parseValue(PropertyDefinition.java:102)
    at org.beanio.parser.RecordDefinition.parseBean(RecordDefinition.java:79)
    at org.beanio.parser.StreamDefinition$BeanReaderImpl.read(StreamDefinition.java:464)
    at teste.Employee.main(Employee.java:30)

What version of the product are you using? On what operating system?
1.2, MacOX Snow Leopard

Please provide any additional information below.

Original issue reported on code.google.com by pedroh.l...@gmail.com on 30 Sep 2011 at 5:29

GoogleCodeExporter commented 8 years ago
Hello,

I was able to reproduce the issue in release 1.2.0, but not in release 1.2.1, 
so I think this may have been inadvertently fixed.  Please try using 1.2.1 and 
let me know if you still experience the problem.  If you do, include the full 
mapping file and a sample record.

Thanks!

Original comment by kevin.s...@gmail.com on 30 Sep 2011 at 9:11

GoogleCodeExporter commented 8 years ago
I could not recreate the issue in release 1.2.1, but still made a minor change 
for release 1.2.2 to prevent any chance of a NPE in that method.

Original comment by kevin.s...@gmail.com on 16 Dec 2011 at 3:59