Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 53623 invoked from network); 25 Jun 2010 14:14:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jun 2010 14:14:13 -0000 Received: (qmail 58561 invoked by uid 500); 25 Jun 2010 14:14:13 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 58512 invoked by uid 500); 25 Jun 2010 14:14:13 -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 58504 invoked by uid 500); 25 Jun 2010 14:14:13 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 58501 invoked by uid 99); 25 Jun 2010 14:14:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 14:14:13 +0000 X-ASF-Spam-Status: No, hits=-1544.9 required=10.0 tests=ALL_TRUSTED,AWL 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; Fri, 25 Jun 2010 14:14:12 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5PEDp6L012174 for ; Fri, 25 Jun 2010 14:13:52 GMT Message-ID: <11791534.24851277475231867.JavaMail.jira@thor> Date: Fri, 25 Jun 2010 10:13:51 -0400 (EDT) From: "Fintan Bolton (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-2861) Implementation of EndpointHelper.matchPattern() method is inconsistent In-Reply-To: <957361.24841277475112387.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/CAMEL-2861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fintan Bolton updated CAMEL-2861: --------------------------------- Description: The current implementation of {{EndpointHelper.matchPattern()}} is inconsistent, because it tries to combine glob-style wildcards and regex matching in a single function. Currently, if you pass a pattern such as {{name*}}, this will match any string with the prefix, {{name}}. Any other pattern will be interpreted as a regex. This is pretty confusing and non-intuitive. It would be better to split this into two separate functions like {{wildcardMatch()}} and {{regexMatch()}} and to call whichever of these functions makes sense, depending on the context. I came across this issue while documenting the {{removeHeaders()}} method, which takes a pattern as its argument., was: The current implementation of {{EndpointHelper.matchPattern()}} is inconsistent, because it tries to combine glob-style wildcards and regex matching in a single function. Currently, if you pass a pattern such as {{name*}}, this will match any string with the prefix, {{name}}. Any other pattern will be interpreted as a regex. This is pretty confusing and non-intuitive. It would be better to split this into two separate functions like {{wildcardMatch()}} and {{regexMatch()} and to call whichever of these functions makes sense, depending on the context. I came across this issue while documenting the {{removeHeaders()}} method, which takes a pattern as its argument., > Implementation of EndpointHelper.matchPattern() method is inconsistent > ---------------------------------------------------------------------- > > Key: CAMEL-2861 > URL: https://issues.apache.org/activemq/browse/CAMEL-2861 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.3.0 > Reporter: Fintan Bolton > Fix For: 2.4.0 > > > The current implementation of {{EndpointHelper.matchPattern()}} is inconsistent, because it tries to combine glob-style wildcards and regex matching in a single function. Currently, if you pass a pattern such as {{name*}}, this will match any string with the prefix, {{name}}. Any other pattern will be interpreted as a regex. This is pretty confusing and non-intuitive. It would be better to split this into two separate functions like {{wildcardMatch()}} and {{regexMatch()}} and to call whichever of these functions makes sense, depending on the context. > I came across this issue while documenting the {{removeHeaders()}} method, which takes a pattern as its argument., -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.