Hi,

I think there is a inconsistent behaviour in parseRecord function of 
GenericCsvInputFormat, but I would like anybody confirm it.
When using readCsvFile and mapping to pojo objects with fields typed as String, 
the  result of the parsing is diferent depending on the field position when 
having empty values

In case any field but the last, has empty values, the parseRecord function 
returns true. In case the last field has an empty value, in the for loop the 
startPos and limit are equal, and function returns false if lenient is tru or 
throws an exception.

Example
Having a pojo with 3 attributes of type String and trying to parse the 
following records

String|String|String -> OK
||String -> OK
String|String| ->NOK

First two are correct but the last throws the ParseException in line 365

I think that or every null String makes to discard the records or the parsing 
should consider empty values at the end of the record.
What do you think?

Thanks
Regards

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede 
contener informaci?n privilegiada o confidencial y es para uso exclusivo de la 
persona o entidad de destino. Si no es usted. el destinatario indicado, queda 
notificado de que la lectura, utilizaci?n, divulgaci?n y/o copia sin 
autorizaci?n puede estar prohibida en virtud de la legislaci?n vigente. Si ha 
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente 
por esta misma v?a y proceda a su destrucci?n.

The information contained in this transmission is privileged and confidential 
information intended only for the use of the individual or entity named above. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this transmission in error, do not 
read it. Please immediately reply to the sender that you have received this 
communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinat?rio, pode 
conter informa??o privilegiada ou confidencial e ? para uso exclusivo da pessoa 
ou entidade de destino. Se n?o ? vossa senhoria o destinat?rio indicado, fica 
notificado de que a leitura, utiliza??o, divulga??o e/ou c?pia sem autoriza??o 
pode estar proibida em virtude da legisla??o vigente. Se recebeu esta mensagem 
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e 
proceda a sua destrui??o

Reply via email to