felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Some ideas for improvements in resolver
Date Wed, 11 May 2016 13:52:19 GMT
Hi Christian,

About 1/, the spec classes will be embedded in the resolver bundle anyway ?

+1 to upgrade to Java 6.

+0 on removing the generic Util class.

+0 about ResolveSession and move Blame, PermutationType, etc there. I'm 
not sure it will actually reduce the "global" weight (just moving code 
from ResolverImpl to ResolveSession.


On 05/11/2016 09:50 AM, Christian Schneider wrote:
> Thomas asked me to look into the current code in resolver after his
> improvements.
> I found some spots that could be improved:
> - We currently have a copy of the resolver spec sources inside the code.
> I propose to refer to the spec bundle instead and embed the classes from
> there. This protects against accidental changes in the spec sources. The
> only caveat is that there is a difference in the bugfix version of the
> spec but I think this is not a problem.
>          <dependency>
>              <groupId>org.osgi</groupId>
> <artifactId>org.osgi.service.resolver</artifactId>
>              <version>1.0.1</version>
>          </dependency>
> - I get some errors inside eclipse in CopyOnWriteListIterator. The
> reason is that it uses @Override on methods from an interface while the
> source level is at Java 5 which does not support this. So we can either
> use java 6 or remove the @Override annotations there. I propose to
> upgrade to Java 6.
> - Avoid the generic Util class. We can split it into ResourceUtil and
> RequirementUtil which would both host about half of the methods.
> - Extract Consistency checks from ResolverImpl into a class
> ConsistencyChecker like proposed in
> https://issues.apache.org/jira/browse/FELIX-4848 . I have to validate
> that this still works with the new code but I think it should.
> - Extract ResolveSession and move Blame, PermutationType and UsedBlames
> inside ResolveSession. This takes a bit of weight out of ResolverImpl
> and also makes the cycle between ResolveSession and Capabilities smaller
> thought it does not fully remove it
> I first would like to get some general feedback about the proposed
> changes. I will then create jiras and pull requests for the ones that
> the community is positve about.
> Christian

Jean-Baptiste Onofré
Talend - http://www.talend.com

View raw message