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 9DC121071C for ; Tue, 28 Jan 2014 15:05:43 +0000 (UTC) Received: (qmail 79638 invoked by uid 500); 28 Jan 2014 15:05:42 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 79451 invoked by uid 500); 28 Jan 2014 15:05:41 -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 79325 invoked by uid 99); 28 Jan 2014 15:05:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 15:05:39 +0000 Date: Tue, 28 Jan 2014 15:05:38 +0000 (UTC) From: "Tomas Rohovsky (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 ] Tomas Rohovsky updated CAMEL-7155: ---------------------------------- Priority: Minor (was: Major) > 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 > Priority: Minor > > 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)