[ 
https://issues.apache.org/jira/browse/ARTEMIS-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491747#comment-16491747
 ] 

ASF GitHub Bot commented on ARTEMIS-1890:
-----------------------------------------

GitHub user jostbg opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2113

    [ARTEMIS-1890] Any-word wildcard fix

    This patch fixes the reported bug, improves code readability and also 
improves the performance of the matches function by storing immutable values 
acquired via method calls in final local variables outside the loop and by 
avoiding the creation of short-lived temporary objects in the inner loop. Also 
comments are added for better understanding of the different check steps.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jostbg/activemq-artemis ARTEMIS-1890

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2113.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2113
    
----
commit 97e0de27457d2eff27dc0cc9c14430bae63b42b4
Author: Johan Stenberg <35264802+jostbg@...>
Date:   2018-05-26T17:16:20Z

    adding test case for ARTEMIS-1890

commit 6b6ebe3c74fa259b1cbc72651ea3cf5269ea5bae
Author: Johan Stenberg <35264802+jostbg@...>
Date:   2018-05-26T17:26:27Z

    [ARTEMIS-1890] Fix AddressImpl
    
    This patch fixes the reported bug, improves code readability and also 
improves the performance of the matches function by storing immutable values 
acquired via method calls in final local variables outside the loop and by 
avoiding the creation of short-lived temporary objects in the inner loop. Also 
comments are added for better understanding of the different check steps.

----


> # any-word wildcard doesn't match zero words if not used at the end of a 
> wildcard expression
> --------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1890
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1890
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.6.0
>            Reporter: Johan Stenberg
>            Priority: Major
>         Attachments: Artemis1890_AnyWordWildCard_Test.java
>
>
> [https://activemq.apache.org/artemis/docs/latest/wildcard-syntax.html] states 
> that the {{#}} wildcard character means _"match any sequence of *zero* or 
> more words"_. This however is only true if the wild card is the last 
> character in a wildcard expression. If any word comes after the wildcard 
> character then the actual behavior is _"match any sequence of *one* or more 
> words"_
> This means, the pattern {{topics.#.FOO}} matches {{topics.abc.FOO}} but not 
> {{topics.FOO}}
> I am attaching a test case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to