Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA95EDFCC for ; Wed, 19 Sep 2012 15:45:07 +0000 (UTC) Received: (qmail 77288 invoked by uid 500); 19 Sep 2012 15:45:07 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 77242 invoked by uid 500); 19 Sep 2012 15:45:07 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 77232 invoked by uid 99); 19 Sep 2012 15:45:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2012 15:45:07 +0000 Date: Thu, 20 Sep 2012 02:45:07 +1100 (NCT) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Message-ID: <1975371429.97685.1348069507429.JavaMail.jiratomcat@arcas> In-Reply-To: <145015828.88342.1347899347725.JavaMail.jiratomcat@arcas> Subject: [jira] [Resolved] (FELIX-3670) PackageAdmin.isBundleType throws NPE for uninstalled bundle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger resolved FELIX-3670. -------------------------------------- Resolution: Fixed Fixed as proposed in Rev. 1387646 > 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