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

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

    Fix Version/s: framework-4.2.0
    
> 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
>             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

Reply via email to