felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-2851) Resolution problems after a fragment can't be resolved
Date Fri, 18 Feb 2011 23:49:38 GMT

    [ https://issues.apache.org/jira/browse/FELIX-2851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996661#comment-12996661
] 

Richard S. Hall commented on FELIX-2851:
----------------------------------------

I am certain there will be different behavior. Still, if we end up needing to do a bug fix
release for some reason, we can always branch from the 3.0.8 release tag.

However, I'm not against a 3.0.9 release. We can branch trunk right now temporarily to prepare
a 3.0.9 release. Once 3.0.9 is released, the branch can be deleted and if any subsequent bug
fix releases are needed, they can be branched from the 3.0.9 release tag.

> 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<Module> fragments = ((ModuleImpl) host).getFragments();
> +        List<Module> fragments = new ArrayList<Module>(((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

        

Mime
View raw message