[
https://issues.apache.org/jira/browse/CAMEL-13304?focusedWorklogId=210191&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-210191
]
ASF GitHub Bot logged work on CAMEL-13304:
------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Mar/19 15:13
Start Date: 08/Mar/19 15:13
Worklog Time Spent: 10m
Work Description: rnetuka commented on pull request #2811: [CAMEL-13304]
Camel Bindy Tab delimited - Handling Blank Values
URL: https://github.com/apache/camel/pull/2811
Issue: https://issues.apache.org/jira/browse/CAMEL-13304
When using tab as a separator in CSV (i.e. TSV format), trimming any leading
whitespaces might lead to breaking empty field values.
Trailing whitespaces shouldn't be a problem, since all unset fields will
have their default values. Also, empty lines are discarded by line =
line.replaceAll("\s+$", ""); as they were before.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 210191)
Time Spent: 10m
Remaining Estimate: 0h
> Camel Bindy Tab delimited - Handling Blank Values
> -------------------------------------------------
>
> Key: CAMEL-13304
> URL: https://issues.apache.org/jira/browse/CAMEL-13304
> Project: Camel
> Issue Type: Bug
> Components: camel-bindy
> Reporter: Radovan Netuka
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Attached the tab Delimited File, XSD/java Object and the converted XML. The
> Bindy is not reading the file properly based on position when it has blank
> values.
> Input file:
>
> |Student 1st 80 56 54 90 90|
> |hello 1st 70 65 75 90 11|
>
> On the output, i see this,
>
> |<?xml version='1.0' encoding='UTF-8'?>|
> |<list>|
> |<com.redhat.StudentResult>|
> |<id>Student</id>|
> |<name>1st</name>|
> |<semester>80</semester>|
> |<grade>B</grade>|
> |<totalScore>290</totalScore>|
> |<result>Pass</result>|
> |<javaMarks>56</javaMarks>|
> |<cMarks>54</cMarks>|
> |<dbmsMarks>90</dbmsMarks>|
> |<mathematicsMarks>90</mathematicsMarks>|
> |<dataStructureMarks>0</dataStructureMarks>|
> |</com.redhat.StudentResult>|
> |<com.redhat.StudentResult>|
> |<id>hello</id>|
> |<name>1st</name>|
> |<semester>70</semester>|
> |<grade>C</grade>|
> |<totalScore>241</totalScore>|
> |<result>Fail</result>|
> |<javaMarks>65</javaMarks>|
> |<cMarks>75</cMarks>|
> |<dbmsMarks>90</dbmsMarks>|
> |<mathematicsMarks>11</mathematicsMarks>|
> |<dataStructureMarks>0</dataStructureMarks>|
> |</com.redhat.StudentResult>|
> |</list>|
>
> The order was not followed, as you can see from the xml you paste. The
> Student and hello is mapped to ID tag (should be mapped on the name tag). the
> ID tag should be empty since from the input file it is blank.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)