This is related to the fix for FELIX-5514. The FelixResolveContext is an internal type (not something I consider real API at this point). But its intention is to be used by the framework (Felix and Equinox in particular) to allow the framework to do things necessary to implement the OSGi framework easier. For example, discovering related fragments when resolving a host bundle. I added a new method getSubstitutionWires to make the discovery of substituted wires more efficient for resolved bundle wirings from the framework. The reason I did this was because the framework must already know what wires are substitute wires for packages from the wiring. This information is necessary to properly implement class loader delegation for require-bundle (section 3.13.1):
<spec> Requiring bundles must get wired to all exported packages of all their required bundles including exported packages from their attached fragments. This means that any mandatory attributes on these exports must be ignored. However, if a required bundle's exported package is substituted for an imported package, then the requiring bundles must get wired to the same exported package that the required bundle is wired to ensure class space consistency. </spec> In the resolver I have implemented the algorithm for discovering the substitution wires when there is no FelixResolveContext used. See org.apache.felix.resolver.ResolverImpl.getSubstitutionWires(Wiring) That is currently a private static method. If the Felix framework does not already have the substitution wire information available then we can consider making this static method public so you can call it from your FelixResolveContext implementation. But I think if you don't already have this information calculated for resolved wirings then you likely have a bug in require-bundle class loader delegation. My hope is that in a future OSGi Resolver specification the ResolveContext API from OSGi will contain updates that make the FelixResolveContext interface obsolete. For example, the proposed updates for the R7 resolver already remove the need for the method FelixResolveContext.getOndemandResources(Resource). Tom. On Mon, Feb 13, 2017 at 10:13 AM, Pierre De Rop <[email protected]> wrote: > Hi All, > > I also would like to do a test with the latest framework and resolver from > the trunk, but it looks like there is a compilation issue with the > framework (trunk): > > I have rebuilt the resolver, then the framework, and I'm having this error: > > [ERROR] > /tmp/xx/framework/src/main/java/org/apache/felix/ > framework/ResolveContextImpl.java:[44,8] > org.apache.felix.framework.ResolveContextImpl is not abstract and does not > override abstract method getSubstitutionWires(org.osgi.resource.Wiring) in > org.apache.felix.resolver.FelixResolveContext > > can someone please check this ? > > I just came across a NPE in the resolver using framework 5.6.1 and I would > like to check if I'm also having it with the latest resolver from the > trunk; thank you. > > best regards > /Pierre > > > On Mon, Feb 13, 2017 at 10:48 AM, Guillaume Nodet <[email protected]> > wrote: > > > Great ! > > Let me know if you need any help... > > > > Cheers, > > Guillaume > > > > 2017-02-10 12:53 GMT+01:00 Karl Pauls <[email protected]>: > > > > > I can do the release next week if you don't mind, as I was planning to > > > do a framework release anyhow (almost done with FELIX-5528 - just need > > > a bit more testing). > > > > > > regards, > > > > > > Karl > > > > > > On Fri, Feb 10, 2017 at 8:43 AM, Guillaume Nodet <[email protected]> > > > wrote: > > > > I'd like to get FELIX-5450 and FELIX-5514 out of the door, so unless > > > > someone volunteer to do the resolver 1.10.2 release, i'll give it a > > try > > > > next week. > > > > > > > > Cheers, > > > > Guillaume > > > > > > > > > > > > -- > > > Karl Pauls > > > [email protected] > > > > > > > > > > > -- > > ------------------------ > > Guillaume Nodet > > >
