Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 48425 invoked from network); 18 Feb 2011 22:55:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2011 22:55:05 -0000 Received: (qmail 4151 invoked by uid 500); 18 Feb 2011 22:55:04 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 3659 invoked by uid 500); 18 Feb 2011 22:55:04 -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 3529 invoked by uid 99); 18 Feb 2011 22:55:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 22:55:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 22:55:02 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 405551A10D4 for ; Fri, 18 Feb 2011 22:54:41 +0000 (UTC) Date: Fri, 18 Feb 2011 22:54:41 +0000 (UTC) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Message-ID: <1671522733.2050.1298069681242.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <173156036.2032.1298069198403.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (FELIX-2851) Resolution problems after a fragment can't be resolved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-2851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996633#comment-12996633 ] Richard S. Hall commented on FELIX-2851: ---------------------------------------- Again, this code won't even exist next week, so I'm not sure it makes sense to bother with it right now. However, if you have some use case that is impacted by this bug, keep it around so we can test it on the new resolver next week. > Resolution problems after a fragment can't be resolved > ------------------------------------------------------ > > Key: FELIX-2851 > URL: https://issues.apache.org/jira/browse/FELIX-2851 > Project: Felix > Issue Type: Bug > Components: Framework > Reporter: Guillaume Nodet > > When a fragment can't be resolved correctly, his removal isn't properly handled. > The following patch seems to fix the problem: > {code} > diff --git a/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java b/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java > index 534d56f..ca74100 100644 > --- a/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java > +++ b/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java > @@ -157,8 +157,9 @@ public class FelixResolverState implements Resolver.ResolverState > > public void detachFragment(Module host, Module fragment) > { > - List fragments = ((ModuleImpl) host).getFragments(); > + List fragments = new ArrayList(((ModuleImpl) host).getFragments()); > fragments.remove(fragment); > + removeFragment(fragment); > try > { > ((ModuleImpl) host).attachFragments(fragments); > {code} > The first line is needed as the attachFragments() processing is screwed because the original list of modified. > The second line will actually remove packages exported by the fragment from the capabilities set. > I'd like to apply that on to the 3.0.x branch and trunk (eventually), so please review. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira