felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Some ideas for improvements in resolver
Date Wed, 11 May 2016 07:50:42 GMT
Thomas asked me to look into the current code in resolver after his 

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.
- 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 Schneider

Open Source Architect

View raw message