Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 34675 invoked from network); 20 Jan 2011 17:11:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jan 2011 17:11:08 -0000 Received: (qmail 57631 invoked by uid 500); 20 Jan 2011 17:11:07 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 57458 invoked by uid 500); 20 Jan 2011 17:11:06 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 57441 invoked by uid 500); 20 Jan 2011 17:11:05 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 57433 invoked by uid 99); 20 Jan 2011 17:11:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 17:11:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 17:11:04 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0KHAipF023788 for ; Thu, 20 Jan 2011 17:10:44 GMT Message-ID: <20775224.85171295543444120.JavaMail.jira@thor> Date: Thu, 20 Jan 2011 12:10:44 -0500 (EST) From: "Ashwin Karpe (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-3562) BindyFixedLengthDataFormat does a trim on Fixed Length record In-Reply-To: <12230783.70341295483744005.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashwin Karpe updated CAMEL-3562: -------------------------------- Attachment: CAMEL-3562.patch Please find attached a patch that fixes this issue by adding another option to the FIxedLengthRecord annotation called trimRecordOnUnmarshal with default value set to true. The user can then alter this behavior to achieve the effect needed. Unit tests are provided... Cheers, Ashwin... > 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 > Attachments: 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.