camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9432) Bindy CSV separator not treated as regex but fixed character in all cases
Date Wed, 24 Feb 2016 13:33:18 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15162983#comment-15162983
] 

ASF GitHub Bot commented on CAMEL-9432:
---------------------------------------

GitHub user lburgazzoli opened a pull request:

    https://github.com/apache/camel/pull/864

    CAMEL-9432 - Bindy CSV separator not treated as regex but fixed character in all cases

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lburgazzoli/apache-camel CAMEL-9432

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/864.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #864
    
----
commit e3608281e7b6767fb4ac5a008ec8189ddb9cbac9
Author: lburgazzoli <lburgazzoli@gmail.com>
Date:   2016-02-24T13:31:46Z

    CAMEL-9432 - Bindy CSV separator not treated as regex but fixed character in all cases

----


> 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
>
> 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)

Mime
View raw message