in the last commit 0e72f475f80a9699fe49004c431e1ce4e360c35d for
org.apache.camel.dataformat.bindy.BindyFixedLengthFactory

the trimming was changed 

from 

            if (dataField.trim()) {
                //token = token.trim();
            }

to

            if (dataField.trim()) {
                token = trim(token, dataField, paddingChar);
                //token = token.trim();
            }

the trimfunction only trims to the right OR left

    private String trim(String token, DataField dataField, char paddingChar)
{
        char myPaddingChar = dataField.paddingChar();
        if (dataField.paddingChar() == 0) {
            myPaddingChar = paddingChar;
        }
        if ("R".equals(dataField.align())) {
            return leftTrim(token, myPaddingChar);
        } else {
            return rightTrim(token, myPaddingChar);
        }
    }

I really just want to trim on both sides also the documentation on this is
not updated. 

thanks for all good work

/erik



--
View this message in context: 
http://camel.465427.n5.nabble.com/bindy-trim-fixedlength-tp5793047.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to