camel-dev mailing list archives

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

    [ https://issues.apache.org/activemq/browse/CAMEL-2861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60277#action_60277
] 

Claus Ibsen commented on CAMEL-2861:
------------------------------------

This is *not* inconsistent. This is how the endpoint wildcard matching works in Camel for
its interceptors and whatnot.
Its documented in the javadoc of the method how it matches.

Its much easier for end users to just type {{jdbc*}} to match anything related to JDBC endpoints.
With regular exp which some end users is not good at you have to do it like {{jdbc.*}} and
whatnot.

This is by design it works as it does.

> 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