Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 223296DAE for ; Fri, 8 Jul 2011 15:32:40 +0000 (UTC) Received: (qmail 6911 invoked by uid 500); 8 Jul 2011 15:32:40 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 6416 invoked by uid 500); 8 Jul 2011 15:32:38 -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 6398 invoked by uid 99); 8 Jul 2011 15:32:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 15:32:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 15:32:37 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 26C1E4DE6B for ; Fri, 8 Jul 2011 15:32:17 +0000 (UTC) Date: Fri, 8 Jul 2011 15:32:17 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: dev@camel.apache.org Message-ID: <1923567897.11485.1310139137155.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <251700407.11434.1310138296578.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4198) Bindy Parser not handling Null values in KVP 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-4198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062017#comment-13062017 ] Claus Ibsen commented on CAMEL-4198: ------------------------------------ Do you want to attempt to provide a patch with a fix? It seems you may have to check the length of the keyValuePair is > 1 to avoid the NPE. And if possible an unit test would be really good as well. > Bindy Parser not handling Null values in KVP > -------------------------------------------- > > Key: CAMEL-4198 > URL: https://issues.apache.org/jira/browse/CAMEL-4198 > Project: Camel > Issue Type: Improvement > Components: camel-bindy > Affects Versions: 2.7.1 > Environment: developement > Reporter: surya > Priority: Minor > Fix For: 2.9.0 > > > Camel Bindy is not handling null values in KVP. It throws ArrayIndexOutOfBounds Exception. > From the source below if FIX message has a key value pair with null value i.e (eg: 43=1|63=|64=xyz) the key 63 has no value an while parsing it throws exception for keyValuePair[1]. > // Get KeyValuePair > String[] keyValuePair = s.split(getKeyValuePairSeparator()); > // Extract Key > int key = Integer.parseInt(keyValuePair[0]); > // Extract key value > String value = keyValuePair[1]; -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira