You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2010/07/13 16:58:49 UTC

[jira] Created: (FELIX-2473) Subtring matching is incorreclty matching against an empty string

Subtring matching is incorreclty matching against an empty string
-----------------------------------------------------------------

                 Key: FELIX-2473
                 URL: https://issues.apache.org/jira/browse/FELIX-2473
             Project: Felix
          Issue Type: Bug
          Components: Framework, Specification compliance
    Affects Versions: framework-3.0.1
            Reporter: Richard S. Hall
            Priority: Minor
             Fix For: framework-3.2.0


The substring matching, which is part of the SimpleFilter implementation is incorrectly matching empty strings. For example, it says "" matches "foo". This is happening because it uses empty strings as replacements for "*" when doing wildcard matching, thus it gets confused when there really is an empty string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2473) Subtring matching is incorreclty matching against an empty string

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall closed FELIX-2473.
----------------------------------

      Assignee: Richard S. Hall
    Resolution: Fixed

I just applied a simple fix that merely special cases the case where there is no wildcard in a substring comparison. In that case, you simply need to return the result of equals() immediately...this works for empty string or any other non-wildcarded string.

> Subtring matching is incorreclty matching against an empty string
> -----------------------------------------------------------------
>
>                 Key: FELIX-2473
>                 URL: https://issues.apache.org/jira/browse/FELIX-2473
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework, Specification compliance
>    Affects Versions: framework-3.0.1
>            Reporter: Richard S. Hall
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: framework-3.2.0
>
>
> The substring matching, which is part of the SimpleFilter implementation is incorrectly matching empty strings. For example, it says "" matches "foo". This is happening because it uses empty strings as replacements for "*" when doing wildcard matching, thus it gets confused when there really is an empty string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2473) Subtring matching is incorreclty matching against an empty string

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls updated FELIX-2473:
------------------------------

    Fix Version/s:     (was: framework-3.2.0)
                   framework-3.0.2

> Subtring matching is incorreclty matching against an empty string
> -----------------------------------------------------------------
>
>                 Key: FELIX-2473
>                 URL: https://issues.apache.org/jira/browse/FELIX-2473
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework, Specification compliance
>    Affects Versions: framework-3.0.1
>            Reporter: Richard S. Hall
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: framework-3.0.2
>
>
> The substring matching, which is part of the SimpleFilter implementation is incorrectly matching empty strings. For example, it says "" matches "foo". This is happening because it uses empty strings as replacements for "*" when doing wildcard matching, thus it gets confused when there really is an empty string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.