[ 
https://issues.apache.org/jira/browse/FELIX-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14576793#comment-14576793
 ] 

Christian Schneider commented on FELIX-4848:
--------------------------------------------

[~tjwatson] Hi Thomas. Many thanks for your offer to do a review. It took a bit 
longer as I had problems with the maven build. I created a pull request now. 
I mainly extracted two parts out of ResolverImpl:
ConsistencyChecker: Contains all checks from ResolverImpl. It accesses the 
inner classes that form the model of ResolverImpl but nothing else from it
CapabilityFinder: Encapsulates finding capabilities for packages and the 
caching that is done to speed this up

I would like to improve the printing of the error messages too but defered this 
to a later issue to make this a simpler refactoring that mainly moves code.
One downside is that we now have a small circular usage of the inner classes of 
ResolverImpl. I could solve this by extracting the inner classes if you want. 
In that case though I would propose to create a new package for ResolverImpl, 
ConsistencyChecker, CapabilityFinder and the inner classes so it is clear that 
they are only to be used in this context.

> Split ResolverImpl
> ------------------
>
>                 Key: FELIX-4848
>                 URL: https://issues.apache.org/jira/browse/FELIX-4848
>             Project: Felix
>          Issue Type: Improvement
>          Components: Resolver
>    Affects Versions: resolver-1.0.0
>            Reporter: Christian Schneider
>             Fix For: resolver-1.4.0
>
>         Attachments: Dependencies in resolver package after patch.png, 
> FELIX-4848-1.patch
>
>
> ResolverImpl currently contains about 2300 lines of code. That is way too big 
> for a single class.
> I looked into it and found that the checkDynamicPackageSpaceConsistency and 
> checkPackageSpaceConsistency methods and their dependent methods form a nice 
> subset. I would move that into a class ConsistencyCheck.
> Both would share all of the inner classes of ResolverImpl but nothing else. 
> So I think i would make sense to move these inner classes to separate files.
> These changes should nicely split the classes into 
> ResolverImpl : 1400 lines
> ConsistencyCheck : 600 lines



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to