You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that handleConversionError throws an ArrayIndexOutOfBoundsException, when a CSV file contains only one field without commas in a record while the header have seviral columns.
The row[2] fails because of that:
Input CSV:
LastName, FirstName, Number, Date
Johnson, James, 00000, 2022-7-26
Smith
Messages:
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at com.univocity.parsers.common.DefaultConversionProcessor.handleConversionError(DefaultConversionProcessor.java:284)
at com.univocity.parsers.common.DefaultConversionProcessor.validateAllValues(DefaultConversionProcessor.java:173)
at com.univocity.parsers.common.DefaultConversionProcessor.applyConversions(DefaultConversionProcessor.java:132)
at com.univocity.parsers.common.processor.core.BeanConversionProcessor.createBean(BeanConversionProcessor.java:663)
at com.univocity.parsers.common.processor.core.AbstractBeanProcessor.rowProcessed(AbstractBeanProcessor.java:54)
at com.univocity.parsers.common.Internal.process(Internal.java:30)
... 62 common frames omitted
ExceptionHandlerExceptionResolver - Resolved [com.univocity.parsers.common.DataProcessingException:
Unexpected error processing input row [Smith] using Processor com.univocity.parsers.common.processor.BeanListProcessor.
<EOL>Internal state when error was thrown: row=[Smith]] (AbstractHandlerExceptionResolver.java:208)
Original source: my app encounters an error when it processes row[column] = defaultValue;
Hello Univocity Team,
It seems that
handleConversionError
throws an ArrayIndexOutOfBoundsException, when a CSV file contains only one field without commas in a record while the header have seviral columns.The row[2] fails because of that:
Input CSV:
Messages:
Original source: my app encounters an error when it processes
row[column] = defaultValue;
univocity-parsers, version: 2.9.1
Thank you for your work on the excellent Univocity library.
The text was updated successfully, but these errors were encountered: