camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fintan Bolton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAMEL-2861) Implementation of EndpointHelper.matchPattern() method is inconsistent
Date Fri, 25 Jun 2010 14:13:51 GMT

     [ 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.


Mime
View raw message