BindyCsvDataFormat breaks for non-required fields when separator is a
whitespacecharacter like tab.
---------------------------------------------------------------------------------------------------
Key: CAMEL-5133
URL: https://issues.apache.org/jira/browse/CAMEL-5133
Project: Camel
Issue Type: Bug
Components: camel-bindy
Affects Versions: 2.9.1, 2.7.3, 2.10.0
Environment: Windows:
OS Name: Microsoft Windows 7 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer: Microsoft Corporation
SpringSource Tool Suite
Version: 2.9.1.RELEASE
Build Id: 201203221000
Reporter: Magnus Palmér
Priority: Minor
When the separator is a whitespacecharacter and the last two (or more) fields
are not required and empty, the parsing fails.
The cause is this:
BindyCsvDataFormat.java
138 // Read the line
139 String line = scanner.nextLine().trim();
String.trim() trims whitespace characters as in
Character.isWhitespace(separatorChar)
See also:
http://camel.465427.n5.nabble.com/Bindy-Having-trouble-with-the-required-field-tp5597196p5597196.html
I can provide testcases and patches if necessary.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira