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/02/16 10:12:28 UTC

[jira] Resolved: (FELIX-1809) OBR issue when using parameters with exported packages

     [ https://issues.apache.org/jira/browse/FELIX-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-1809.
------------------------------------

       Resolution: Fixed
    Fix Version/s: bundlerepository-1.6.0
         Assignee: Richard S. Hall

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.