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 2016/02/25 08:13:18 UTC
[jira] [Resolved] (CAMEL-9432) Bindy CSV separator not treated as
regex but fixed character in all cases
[ https://issues.apache.org/jira/browse/CAMEL-9432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-9432.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.17.0
2.16.3
2.15.6
> Bindy CSV separator not treated as regex but fixed character in all cases
> -------------------------------------------------------------------------
>
> Key: CAMEL-9432
> URL: https://issues.apache.org/jira/browse/CAMEL-9432
> Project: Camel
> Issue Type: Bug
> Components: camel-bindy
> Affects Versions: 2.16.1
> Reporter: Jon Fields
> Assignee: Luca Burgazzoli
> Priority: Minor
> Fix For: 2.15.6, 2.16.3, 2.17.0
>
>
> In the camel-bindy documentation (http://camel.apache.org/bindy.html) it says that the {{@CsvRecord separator}} parameter is interpreted as a regex. While that does seem to be the case when the record is being parsed, it seems to be treated as a literal string when autospanLine is true.
> For example, if we have
> {code}
> @CsvRecord(separator="\\s+", autospanLine=true)
> {code}
> and we have defined three string {{@DataField}} fields, and we have a line of input like this:
> {code}
> field1 field2 field3a field3b
> {code}
> then the third field value will be
> {code}
> "field3a\s+field3b"
> {code}
> Looking at the code in {{BindyCsvDataFormat.java}} it seems that this is because in some cases the separator string is treated as a literal string, not a regex. For example, this also seems to be true in some cases in the {{unquoteTokens}} method.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)