[
https://issues.apache.org/jira/browse/CAMEL-12394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-12394.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.21.1
2.20.3
Thanks for the patch.
> Camel Bindy: marshal doesn't quote headers
> ------------------------------------------
>
> Key: CAMEL-12394
> URL: https://issues.apache.org/jira/browse/CAMEL-12394
> Project: Camel
> Issue Type: Improvement
> Components: camel-bindy
> Affects Versions: 2.20.2
> Environment: Windows 7
> Reporter: Clemens Blamauer
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
> Attachments: BindyCsvFactory.patch, WickedCsv.java, WickedCsvTest.java
>
>
> Dear all,
> When marshaling, Bindy doesn't quote headers in CSV files. This is
> problematic in the case where headers contain the separator character. When
> unmarshaling this is no issue, as `skipFirstLine=true`.
> Unfortunately, changing the header is not an option in my case.
> Please find attached:
> * A sample CsvRecord-annotated bean `WickedCsv.java`, and
> * a JUnit test `WickedCsvTest.java`
> which allow to reproduce the issue.
> The assertion error occurs in the last line of the `test()` method:
> `assertEquals(csv.trim(), result.trim())`
> I have attached a patch for BindyCsvFactory (`BindyCsvFactory.patch`), which
> fixes the issue. I copied and adjusted the lines according to the quote
> handling in `org.apache.camel.dataformat.bindy.BindyCsvFactory#bind`.
> Would you please check?
> Thank you.
> Kind regards,
> Clemens
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)