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


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to