You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Önder Sezgin (JIRA)" <ji...@apache.org> on 2017/08/27 19:33:01 UTC

[jira] [Commented] (CAMEL-11710) trim for fixlength only trim one direction

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

Önder Sezgin commented on CAMEL-11710:
--------------------------------------

Seems intentional and agree that it is a bit awkward. I have not found anything in jira and have not had a chance to look git history to see on what purpose it is done that way. Believe there was a reason :) you are welcome to work on a PR

> trim for fixlength only trim one direction
> ------------------------------------------
>
>                 Key: CAMEL-11710
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11710
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.19.2
>            Reporter: Wilson MacGyver
>
> I was noticing for bindy my fixedlength fields, where I set trim to true is no longer working
> then I spotted this
> https://github.com/apache/camel/blob/camel-2.19.2/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java#L226
> the problem is
> https://github.com/apache/camel/blob/camel-2.19.2/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java#L304
> trim function only trim one direction vs the bultin java string.trim()
> is this change intentional? seems like an odd choice if so. it effectively means I'll have to call string trim() function on each field that I marked trim=true



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)