camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Assigned: (CAMEL-3489) BindyCsvDataFormat broken for pipe delimited files
Date Wed, 05 Jan 2011 08:25:46 GMT


Claus Ibsen reassigned CAMEL-3489:

    Assignee: Claus Ibsen

>  BindyCsvDataFormat broken for pipe delimited files
> ---------------------------------------------------
>                 Key: CAMEL-3489
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.5.0
>            Reporter: Steven Lewis
>            Assignee: Claus Ibsen
>         Attachments:, bug.txt
> Attempting to unmarshall a pipe delimited CSV file into a POJO using Bindy causese the
first and last character the the line processed to be dropped.  It appears that the BindyCsvDataFormat
class removes the first and the last character from the line read from the CSV if the seperator
is > 1 characters in length (see below or line 162-165 in BindyCsvDataFormat).  For pipe
delimited files, you need to specify \\| as the seperator, as | is not evaluated correctly
as a java regex by the split fuction.  This leads to the first and last character for the
line being parsed being dropped.  From the comments it appears a "fix" was added to remove
the first and last character of the line when the seperator contains quotes or double quotes.
 Making this determination using the length of the seperator, rather than evaluating using
a regex seems to be a poor solution that breaks other CSV delimiters.
> See Attached for an code example.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message