camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taariq Levack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-3571) camel-bindy - Add trim option to @FixedLengthRecord
Date Thu, 19 May 2011 14:05:47 GMT

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

Taariq Levack commented on CAMEL-3571:
--------------------------------------

I assume backward compatibility is really important here?

Because with the DataField having a default of false it will override the FixedLengthRecord's
setting.

But if the DataField has an enum instead of a boolean then there are more options. 
Lets say NEVER_TRIM(never, ever trim), TRIM(Always trim) and NO_TRIM_UNLESS_FORCED(No trimming
unless the FixedLengthRecord insists).

It can default to NO_TRIM_UNLESS_FORCED, and if the FixedLengthRecord defaults to TRIM_CONSERVATIVELY
then we have the current behaviour of not trimming anything unless DataField is set to TRIM.

FixedLengthRecord can also be set to TRIM_ALL which then trims everything including DataFields
with trim set to NO_TRIM_UNLESS_FORCED, but excluding DataFields set to NEVER_TRIM.

So even if FixedLengthRecord is set to TRIM_ALL you annotate the special DataFields with NEVER_TRIM
and you get the desired behaviour.

> camel-bindy - Add trim option to @FixedLengthRecord
> ---------------------------------------------------
>
>                 Key: CAMEL-3571
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3571
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-bindy
>    Affects Versions: 2.5.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>
> Instead of having to set trim = true on each data field you may want to set a global
trim option on the @FixedLengthRecord. to auto trim fields.
> The problem could be having the data field trim option override the global if it has
been configured. For example if there is a special field which should not be trimmed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message