You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/12/07 06:12:00 UTC

[jira] [Resolved] (CAMEL-15920) Cannot parse CSV if the last (not required) field is empty when using a tab separator

     [ https://issues.apache.org/jira/browse/CAMEL-15920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-15920.
---------------------------------
    Fix Version/s:     (was: 3.x)
                   3.7.0
       Resolution: Fixed

> Cannot parse CSV if the last (not required) field is empty when using a tab separator
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-15920
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15920
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 3.5.0
>            Reporter: Dario Röthlisberger
>            Priority: Major
>             Fix For: 3.7.0
>
>
> Parsing a CSV file fails if the following conditions are met:
>  * tab separator
>  * last field is empty
>  * not all fields are required
>  
> *Example 1*
> {code:java}
> CSV: "VOA\t12 abc street\tMelbourne\tVIC\t3000\tAustralia\t\t"
> {code}
> The last two fields are empty and the CSV *cannot be parsed.*
> *Example 2*
> {code:java}
> CSV: "VOA\t12 abc street\tMelbourne\tVIC\t3000\tAustralia\t\tNot Empty"
> {code}
> The last field is not empty and the CSV *can be parsed.*
>  *Example 3*
> {code:java}
> CSV: "VOA,12 abc street,Melbourne,VIC,3000,Australia,,"
> {code}
> If the comma separator is used and the last field is empty, the CSV *can be parsed.*
> I've just created a test case on current master to demonstrate the bug:
> [Camel-Bindy: csv cannot be parsed if (not required) last field is empty and a tab separator is used by darioxz - Pull Request #1 - darioxz/camel (github.com)|https://github.com/darioxz/camel/pull/1]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)