Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11710

trim for fixlength only trim one direction

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.19.2
    • Fix Version/s: 2.19.3, 2.20.0
    • Component/s: camel-bindy
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                onders Onder Sezgin
                Reporter:
                wmacgyver Wilson MacGyver
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: