Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 50664 invoked from network); 8 Nov 2008 16:27:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2008 16:27:07 -0000 Received: (qmail 79640 invoked by uid 500); 8 Nov 2008 16:27:12 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 79569 invoked by uid 500); 8 Nov 2008 16:27:12 -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 79545 invoked by uid 99); 8 Nov 2008 16:27:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Nov 2008 08:27:11 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Nov 2008 16:26:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 70262234C263 for ; Sat, 8 Nov 2008 08:26:44 -0800 (PST) Message-ID: <157837097.1226161604458.JavaMail.jira@brutus> Date: Sat, 8 Nov 2008 08:26:44 -0800 (PST) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-808) R4SearchPolicyCore.searchDynamicImports() always loads a class even if the object to load is a resource In-Reply-To: <329557680.1226050366461.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard S. Hall updated FELIX-808: ---------------------------------- Affects Version/s: felix-1.4.0 Summary: R4SearchPolicyCore.searchDynamicImports() always loads a class even if the object to load is a resource (was: The method R4SearchPolicyCore.searchDynamicImports( IModule module, String name, String pkgName, boolean isClass) always load a class by using the current thrad class loader even if the object to load is a resource.) > R4SearchPolicyCore.searchDynamicImports() always loads a class even if the object to load is a resource > ------------------------------------------------------------------------------------------------------- > > Key: FELIX-808 > URL: https://issues.apache.org/jira/browse/FELIX-808 > Project: Felix > Issue Type: Bug > Affects Versions: felix-1.4.0 > Reporter: eyindanga > Assignee: Richard S. Hall > > The method R4SearchPolicyCore.searchDynamicImports( IModule module, String name, String pkgName, boolean isClass) always load a class by using the current thrad class loader even if the object to laod is a resource. > This code may chek if the object is a class or a resource, and invoke the coresponding method on the classloader. > // If there are no bundles providing exports for this > // package and if the instigating class was not from a > // bundle, then delegate to the parent class loader. > // Otherwise, break out of loop and return null. > boolean delegate = true; > for (ClassLoader cl = classes[i].getClassLoader(); cl != null; cl = cl.getClass().getClassLoader()) > { > if (ContentClassLoader.class.isInstance(cl)) > { > delegate = false; > break; > } > } > if (delegate) > { > return this.getClass().getClassLoader().loadClass(name); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.