Felix Meschberger created FELIX-3670:
----------------------------------------
Summary: 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
>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