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 5FC00110BC for ; Fri, 21 Feb 2014 14:44:24 +0000 (UTC) Received: (qmail 68591 invoked by uid 500); 21 Feb 2014 14:44:23 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 68504 invoked by uid 500); 21 Feb 2014 14:44:22 -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 68424 invoked by uid 99); 21 Feb 2014 14:44:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Feb 2014 14:44:22 +0000 Date: Fri, 21 Feb 2014 14:44:22 +0000 (UTC) From: "Willem Jiang (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-7155) Incorrect implementation of the method StringHelper.hasStartToken() 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-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated CAMEL-7155: -------------------------------- Fix Version/s: (was: 2.12.4) 2.12.3 > Incorrect implementation of the method StringHelper.hasStartToken() > ------------------------------------------------------------------- > > Key: CAMEL-7155 > URL: https://issues.apache.org/jira/browse/CAMEL-7155 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.12.2 > Reporter: Tomas Rohovsky > Assignee: Willem Jiang > Priority: Minor > Fix For: 2.12.3, 2.13.0 > > > From the semantic point of view the method hasStartToken() should return false in case of an expression without language specified, i.e. starting with "${". > However, it is correct to return true in current usage of hasStartToken() in camel-core, i.e. checking if an expression is in simple language, since if the expression does not contain the language token, then it is a simple expression. > The method calls for checking of simple language should be replaced with a newly created method isSimpleLanguage(String expression) that would check if the language is a simple expression, i.e. hasStartToken(expression, "simple") || expression.indexOf("${") >= 0. -- This message was sent by Atlassian JIRA (v6.1.5#6160)