You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Matthias Küspert (JIRA)" <ji...@apache.org> on 2010/02/19 13:19:28 UTC

[jira] Created: (FELIX-2107) Bundle.findEntries() matches '*' instead of ''

Bundle.findEntries() matches '*<filePattern>' instead of '<filePattern>'
------------------------------------------------------------------------

                 Key: FELIX-2107
                 URL: https://issues.apache.org/jira/browse/FELIX-2107
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: felix-2.0.2
            Reporter: Matthias Küspert


If findEntries() is called without wildcards in <filePattern> and the bundle contains more than one resource ending with <filePattern> then URLs for all those resources are returned instead of the one exact match.

E.g. if the bundle contains the files:
  - WEB-INF/web.xml
  - WEB-INF/1-web.xml
then findEntries("WEB-INF", "web.xml", false) will return 2 URLs instead of 1.


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


[jira] Closed: (FELIX-2107) Bundle.findEntries() matches '*' instead of ''

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

Matthias Küspert closed FELIX-2107.
-----------------------------------


Thanks - the test now works as expected.

> Bundle.findEntries() matches '*<filePattern>' instead of '<filePattern>'
> ------------------------------------------------------------------------
>
>                 Key: FELIX-2107
>                 URL: https://issues.apache.org/jira/browse/FELIX-2107
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.2
>            Reporter: Matthias Küspert
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>         Attachments: bug_findentries-0.0.1-SNAPSHOT.jar
>
>
> If findEntries() is called without wildcards in <filePattern> and the bundle contains more than one resource ending with <filePattern> then URLs for all those resources are returned instead of the one exact match.
> E.g. if the bundle contains the files:
>   - WEB-INF/web.xml
>   - WEB-INF/1-web.xml
> then findEntries("WEB-INF", "web.xml", false) will return 2 URLs instead of 1.

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


[jira] Resolved: (FELIX-2107) Bundle.findEntries() matches '*' instead of ''

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

Richard S. Hall resolved FELIX-2107.
------------------------------------

       Resolution: Fixed
    Fix Version/s: felix-3.0.0
         Assignee: Richard S. Hall

I have committed a patch to fix this issue. It appears that our substring matching code had a couple of bugs in it which were causing false positives. I have created a test case for this situation now.

> Bundle.findEntries() matches '*<filePattern>' instead of '<filePattern>'
> ------------------------------------------------------------------------
>
>                 Key: FELIX-2107
>                 URL: https://issues.apache.org/jira/browse/FELIX-2107
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.2
>            Reporter: Matthias Küspert
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>         Attachments: bug_findentries-0.0.1-SNAPSHOT.jar
>
>
> If findEntries() is called without wildcards in <filePattern> and the bundle contains more than one resource ending with <filePattern> then URLs for all those resources are returned instead of the one exact match.
> E.g. if the bundle contains the files:
>   - WEB-INF/web.xml
>   - WEB-INF/1-web.xml
> then findEntries("WEB-INF", "web.xml", false) will return 2 URLs instead of 1.

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


[jira] Issue Comment Edited: (FELIX-2107) Bundle.findEntries() matches '*' instead of ''

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836128#action_12836128 ] 

Richard S. Hall edited comment on FELIX-2107 at 2/20/10 7:30 AM:
-----------------------------------------------------------------

I have committed a patch to fix this issue. It appears that our substring matching code had a couple of bugs in it which were causing false positives. I have created a test case for this situation now. Please close this issue if you are satisfied, thanks!

      was (Author: rickhall):
    I have committed a patch to fix this issue. It appears that our substring matching code had a couple of bugs in it which were causing false positives. I have created a test case for this situation now.
  
> Bundle.findEntries() matches '*<filePattern>' instead of '<filePattern>'
> ------------------------------------------------------------------------
>
>                 Key: FELIX-2107
>                 URL: https://issues.apache.org/jira/browse/FELIX-2107
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.2
>            Reporter: Matthias Küspert
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>         Attachments: bug_findentries-0.0.1-SNAPSHOT.jar
>
>
> If findEntries() is called without wildcards in <filePattern> and the bundle contains more than one resource ending with <filePattern> then URLs for all those resources are returned instead of the one exact match.
> E.g. if the bundle contains the files:
>   - WEB-INF/web.xml
>   - WEB-INF/1-web.xml
> then findEntries("WEB-INF", "web.xml", false) will return 2 URLs instead of 1.

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


[jira] Updated: (FELIX-2107) Bundle.findEntries() matches '*' instead of ''

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

Richard S. Hall updated FELIX-2107:
-----------------------------------

    Fix Version/s:     (was: felix-3.0.0)
                   felix-2.0.5

> Bundle.findEntries() matches '*<filePattern>' instead of '<filePattern>'
> ------------------------------------------------------------------------
>
>                 Key: FELIX-2107
>                 URL: https://issues.apache.org/jira/browse/FELIX-2107
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.2
>            Reporter: Matthias Küspert
>            Assignee: Richard S. Hall
>             Fix For: felix-2.0.5
>
>         Attachments: bug_findentries-0.0.1-SNAPSHOT.jar
>
>
> If findEntries() is called without wildcards in <filePattern> and the bundle contains more than one resource ending with <filePattern> then URLs for all those resources are returned instead of the one exact match.
> E.g. if the bundle contains the files:
>   - WEB-INF/web.xml
>   - WEB-INF/1-web.xml
> then findEntries("WEB-INF", "web.xml", false) will return 2 URLs instead of 1.

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


[jira] Updated: (FELIX-2107) Bundle.findEntries() matches '*' instead of ''

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

Matthias Küspert updated FELIX-2107:
------------------------------------

    Attachment: bug_findentries-0.0.1-SNAPSHOT.jar

Attached simple testcase.

Call: 
  pax-run.sh --platform=felix --version=2.0.2 --profiles=core,compendium,log scan-bundle:file:bug_findentries-0.0.1-SNAPSHOT.jar
to reproduce the problem.

The bundle contains:

WEB-INF/
WEB-INF/1-web.xml
WEB-INF/web.xml

running it shows that the match is too greedy:

[org.test.bug_findentries.Activator] : calling: findEntries("WEB-INF", "web.xml", false) ...
[org.test.bug_findentries.Activator] :  - found URL: bundle://1.0:0/WEB-INF/1-web.xml
[org.test.bug_findentries.Activator] :  - found URL: bundle://1.0:0/WEB-INF/web.xml
[org.test.bug_findentries.Activator] : finished test.


> Bundle.findEntries() matches '*<filePattern>' instead of '<filePattern>'
> ------------------------------------------------------------------------
>
>                 Key: FELIX-2107
>                 URL: https://issues.apache.org/jira/browse/FELIX-2107
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.2
>            Reporter: Matthias Küspert
>         Attachments: bug_findentries-0.0.1-SNAPSHOT.jar
>
>
> If findEntries() is called without wildcards in <filePattern> and the bundle contains more than one resource ending with <filePattern> then URLs for all those resources are returned instead of the one exact match.
> E.g. if the bundle contains the files:
>   - WEB-INF/web.xml
>   - WEB-INF/1-web.xml
> then findEntries("WEB-INF", "web.xml", false) will return 2 URLs instead of 1.

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