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 22:54:41 GMT

    [ 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<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