j-easy / easy-batch

The simple, stupid batch framework for Java
https://github.com/j-easy/easy-batch/wiki
MIT License
611 stars 199 forks source link

UnivocityCsvRecordMapper java.lang.IndexOutOfBoundsException #374

Closed seseso closed 4 years ago

seseso commented 4 years ago

Trying to use UnivocityCsvRecordMapper to read and map a CSV file. It always throws this exception:

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:458) at org.jeasy.batch.extensions.univocity.AbstractUnivocityRecordMapper.processRecord(AbstractUnivocityRecordMapper.java:70) at org.jeasy.batch.extensions.univocity.UnivocityCsvRecordMapper.processRecord(UnivocityCsvRecordMapper.java:36)

The Unit test have the same problem (version 6.0.0)

seseso commented 4 years ago

I must have a problem on my code as I'm creating a dynamic POJO and with that, the exception occurs. Sorry for the inconvenience!