Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26F7011E12 for ; Wed, 4 Jun 2014 17:43:02 +0000 (UTC) Received: (qmail 25684 invoked by uid 500); 4 Jun 2014 17:43:02 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 25651 invoked by uid 500); 4 Jun 2014 17:43:02 -0000 Mailing-List: contact issues-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 issues@camel.apache.org Received: (qmail 25622 invoked by uid 99); 4 Jun 2014 17:43:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2014 17:43:02 +0000 Date: Wed, 4 Jun 2014 17:43:01 +0000 (UTC) From: "Peter Keller (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-7478) Simple Language - Length of array properties is not correctly evaluated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Peter Keller created CAMEL-7478: ----------------------------------- Summary: Simple Language - Length of array properties is not correctly evaluated Key: CAMEL-7478 URL: https://issues.apache.org/jira/browse/CAMEL-7478 Project: Camel Issue Type: Bug Components: camel-core Affects Versions: 2.13.1 Reporter: Peter Keller If the exchange body is an array, then {{body.length}} returns correctly the length of the array. However, if the array is a property of an object, then not the correct value is returned: {code:title=MyClass.java} public class MyClass { public Object[] getMyArray() { return new Object[]{"Hallo", "World", "!"}; } } {code} Accessing the property {{myArray}} with Simple: {code} body.myArray.length {code} Java: {code} final ProducerTemplate template = main.getCamelTemplate(); template.sendBody("direct:start", new MyClass()); {code} Log: {noformat} [main] route1 INFO mySimpleHeader = 1 {noformat} The return value should be {{3}} instead of {{1}}. -- This message was sent by Atlassian JIRA (v6.2#6252)