Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 91203 invoked from network); 22 Jan 2008 19:41:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jan 2008 19:41:59 -0000 Received: (qmail 8263 invoked by uid 500); 22 Jan 2008 19:41:48 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 8225 invoked by uid 500); 22 Jan 2008 19:41:48 -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 8116 invoked by uid 99); 22 Jan 2008 19:41:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2008 11:41:48 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2008 19:41:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 38B91714243 for ; Tue, 22 Jan 2008 11:41:34 -0800 (PST) Message-ID: <22306354.1201030894221.JavaMail.jira@brutus> Date: Tue, 22 Jan 2008 11:41:34 -0800 (PST) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-467) R4SearchPolicyCore.findResources(String) do not aggregate the Enumeration founds In-Reply-To: <6296212.1200587074480.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-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561436#action_12561436 ] Richard S. Hall commented on FELIX-467: --------------------------------------- For what its worth, Tom Watson says Equinox works like this: ----- Here is what we do in Equinox. 1) First of all, we do not do anything tricky for 1.4 vs 1.5. We assume ClassLoader.getResources is final and always delegates to the boot class loader for every package. 2) For Bundle.getResources() we do not actually ask the ClassLoader.getResources. Instead we wire directly into the proper OSGi delegation model. This unfortunately means Bundle.getResources() and ClassLoader.getResources could potentially return different results depending on what was available from the boot class loader. Lets ignore that little issue and assume we can override ClassLoader.getResources and do proper OSGi delegation. The process should look something like this: 1) Check to see if the resource is in the java/* namespace. If so *only* delegate to boot and return the Enumeration returned from boot. 2) Check to see if the resource is on the o.o.f.bootdelegation list. If so get the Enumeration from boot and pass the result to the next step. 3) Check to see if the resource is imported (using Import-Package). If so delegate to the exporter's local (and fragments) classpath and return the results in a compound Enumeration which includes the results from the previous step. If not imported then pass the incoming Enumeration to the next step. 4) Check to see if the resource is accessed from a required bundle (using Require-Bundle). If so delegate to each required bundle's local (and fragments) classpath which exports the requested resource package and compound the results with the incoming Enumeration. Pass the results to the next step. 5) Delegate to the local bundle's (and fragments) classpath. Compound the results with the incoming Enumeration and return the results. ---- This approach is slightly different than ours, but still can lead to a situation where packages that are boot delegated AND imported can be combined for resources. It is different than our proposal because it explicitly stops if the package is imported. > R4SearchPolicyCore.findResources(String) do not aggregate the Enumeration founds > -------------------------------------------------------------------------------- > > Key: FELIX-467 > URL: https://issues.apache.org/jira/browse/FELIX-467 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: 1.0.0 > Reporter: Guillaume Sauthier > Attachments: FELIX-467-tests-bundles.zip, FELIX-467.patch > > > This issue is linked to FELIX-466 > The R4SearchPolicyCore.findResources(String) method just exits early on a first hit, and doesn't continue into imported packages. > It should aggregate the different hits and return all matching resources. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.