[
https://issues.apache.org/jira/browse/CAMEL-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984577#action_12984577
]
Willem Jiang commented on CAMEL-3562:
-------------------------------------
I don't think current Camel code hononor the "trim = true" attribute of the
DataField when doing the unmarshal work.
{code}
@DataField(pos = 1, length=10, trim=true)
private String userID;
{code}
But for the marshal part, if we hononor this the trim attribute that will cause
the CAMEL-3562 issue.
Can we just trim the String when BindyFixedLengthDataFormat does the marshal
work ?
> BindyFixedLengthDataFormat does a trim on Fixed Length record
> -------------------------------------------------------------
>
> Key: CAMEL-3562
> URL: https://issues.apache.org/jira/browse/CAMEL-3562
> Project: Camel
> Issue Type: Improvement
> Components: camel-bindy
> Affects Versions: 2.4.0
> Reporter: Ashwin Karpe
> Assignee: Ashwin Karpe
> Fix For: 2.6.0
>
> Attachments: CAMEL-3562.patch, UPD-CAMEL-3562.patch
>
>
> BindyFixedLengthDataFormat does a trim on Fixed Length record, although Fixed
> Length recordare strictly positional in nature and may contain lot of fillers
> with empty spaces, doing a trim causes Bindy to fail the message length
> validation and exception is thrown on message length
> // Read the line
> String line = scanner.nextLine().trim();
> Should be changed to
> // Read the line
> String line = scanner.nextLine();
> Or a conditional option should be provided in FixedLengthRecord annotation
> whether or not to trim the entire record
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.