camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Resolved: (CAMEL-2861) Implementation of EndpointHelper.matchPattern() method is inconsistent
Date Sat, 26 Jun 2010 07:03:52 GMT


Claus Ibsen resolved CAMEL-2861.

      Assignee: Claus Ibsen
    Resolution: Working as Designed

trunk: 958191.

I polished the code a bit

> Implementation of EndpointHelper.matchPattern() method is inconsistent
> ----------------------------------------------------------------------
>                 Key: CAMEL-2861
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.3.0
>            Reporter: Fintan Bolton
>            Assignee: Claus Ibsen
>             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.

View raw message