camel-dev mailing list archives

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

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

Claus Ibsen updated CAMEL-3489:
-------------------------------

    Priority: Major  (was: Critical)

>  BindyCsvDataFormat broken for pipe delimited files
> ---------------------------------------------------
>
>                 Key: CAMEL-3489
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3489
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.5.0
>            Reporter: Steven Lewis
>         Attachments: BindyPipeDelimiterBugTest.java, 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.


Mime
View raw message