You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/09/19 17:33:07 UTC

[jira] [Assigned] (FELIX-3670) PackageAdmin.isBundleType throws NPE for uninstalled bundle

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

Felix Meschberger reassigned FELIX-3670:
----------------------------------------

    Assignee: Felix Meschberger
    
> PackageAdmin.isBundleType throws NPE for uninstalled bundle
> -----------------------------------------------------------
>
>                 Key: FELIX-3670
>                 URL: https://issues.apache.org/jira/browse/FELIX-3670
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.3
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: framework-4.2.0
>
>
> From FELIX-3666:
> The PackageAdmin.isBundleType is defined to throw an IllegalArgumentException "If the specified Bundle was not created by the same framework instance that registered this PackageAdmin service". I would assume calling this method on an uninstalled bundle should just return the information because it basically just accesses the bundle headers which must remain available after the bundle has been uninstalled.
> In fact the PackageAdminImpl.isBundleType does
>    bundle.adapt(BundleRevision.class))
> which will return null if the bundle is uninstalled. Instead it should do
>    bundle.adapt(BundleRevisionImpl.class))
> which never returns null and thus still provides access to the headers. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira