[ 
https://issues.apache.org/jira/browse/FELIX-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834130#action_12834130
 ] 

Richard S. Hall edited comment on FELIX-1809 at 2/16/10 9:10 AM:
-----------------------------------------------------------------

I think you are correct. I applied your patch. Please close this issue if you 
are satisfied. Thanks!

      was (Author: rickhall):
    I think you are correct. I applied your patch.
  
> OBR issue when using parameters with exported packages
> ------------------------------------------------------
>
>                 Key: FELIX-1809
>                 URL: https://issues.apache.org/jira/browse/FELIX-1809
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Arjun Panday
>            Assignee: Richard S. Hall
>             Fix For: bundlerepository-1.6.0
>
>         Attachments: patchfilter.tgz, testobr.tar
>
>
> Please consider the attached test case along with the proposed patch.
> - I have single bundle (A.jar) containing com.a.class and exporting the 
> package com.a with a version and a "tag"
> ie: Export-Package: com.a; version="1.2.3";tag="mytag"
> - I use bnd to build the bundle and it generates a similar import (which is 
> good)
> ie: Import-Package: com.a; version="1.2.3";tag="mytag"
> - I use bindex to generate the repository (containing only this bundle) 
> which, in turn, generates the following requirement:
> <require extend='false' 
> filter='(&amp;(package=com.a)(version&gt;=1.2.3)(tag=mytag)(mandatory:&lt;*tag))'
>  multiple='false' name='package' optional='false'>
>       Import package com.a ;version=1.2.3
> </require>
> As such when I try to resolve bundle A from the OBR, it fails. 
> Bundle A does not have a "mandatory" attribute in its capabilities, but as 
> the spec suggests (p18 of RFC-0112):
> "If the value does not exist, then it is still possible to match a subset. A 
> non-existent property is a proper subset of
> any set. A non-existent property is a superset if the list is empty.
>     (mandatory:<*vendor,var)                                         
> Mandatory must contain vendor, var, both or be empty."
> While investigating this issue, i found 2 NullPointerExceptions, in the code 
> of bundlerepository (the first one being hidden behind an empty try/catch)
> When I fix these NullPointerExceptions, the OBR successfully resolves bundle 
> A and my test passes. 
> BUT.. FilterImplTest now fails!
> IF my understanding is right, i think line 73 of FilterImplTest should read 
> assertTrue instead of assertFalse.. (but I must admit that i find the meaning 
> of this "mandatory" part quite confusing!)
> I'm attaching the test and the proposed patch in 2 separate tar files (to be 
> extracted under felix-trunk/bundlerepository).
> Regards,
> Arjun

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

Reply via email to