Return-Path: Delivered-To: apmail-incubator-felix-commits-archive@www.apache.org Received: (qmail 22939 invoked from network); 19 Jul 2006 14:38:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jul 2006 14:38:06 -0000 Received: (qmail 93433 invoked by uid 500); 19 Jul 2006 14:38:06 -0000 Delivered-To: apmail-incubator-felix-commits-archive@incubator.apache.org Received: (qmail 93389 invoked by uid 500); 19 Jul 2006 14:38:06 -0000 Mailing-List: contact felix-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-commits@incubator.apache.org Received: (qmail 93378 invoked by uid 99); 19 Jul 2006 14:38:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 07:38:06 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 07:38:06 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id F3DD01A981A; Wed, 19 Jul 2006 07:37:45 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r423472 - /incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java Date: Wed, 19 Jul 2006 14:37:45 -0000 To: felix-commits@incubator.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060719143745.F3DD01A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rickhall Date: Wed Jul 19 07:37:45 2006 New Revision: 423472 URL: http://svn.apache.org/viewvc?rev=423472&view=rev Log: Felix was interpreting the spec such that bundles did not import from themselves, but it appears that PackageAdmin should consider a bundle that both exports and imports a package as being an importer of the package even if it is selected as the exporter of the package. Previously, Felix has been filtering out this scenario. Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java?rev=423472&r1=423471&r2=423472&view=diff ============================================================================== --- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java (original) +++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java Wed Jul 19 07:37:45 2006 @@ -2680,24 +2680,20 @@ { BundleImpl importer = (BundleImpl) bundles[bundleIdx]; - // Ignore the bundle if it imports from itself. - if (exporter != importer) + // Check the import wires of all modules for all bundles. + IModule[] modules = importer.getInfo().getModules(); + for (int modIdx = 0; modIdx < modules.length; modIdx++) { - // Check the import wires of all modules for all bundles. - IModule[] modules = importer.getInfo().getModules(); - for (int modIdx = 0; modIdx < modules.length; modIdx++) + R4Wire wire = Util.getWire(modules[modIdx], ep.getName()); + + // If the resolving module is associated with the + // exporting bundle, then add current bundle to + // import list. + if ((wire != null) && exporterInfo.hasModule(wire.getExportingModule())) { - R4Wire wire = Util.getWire(modules[modIdx], ep.getName()); - - // If the resolving module is associated with the - // exporting bundle, then add current bundle to - // import list. - if ((wire != null) && exporterInfo.hasModule(wire.getExportingModule())) - { - // Add the bundle to the list of importers. - list.add(bundles[bundleIdx]); - break; - } + // Add the bundle to the list of importers. + list.add(bundles[bundleIdx]); + break; } } }