Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
resolver-1.8.0
-
None
-
None
-
All
Description
The Resolver implementation has undergone a lot of changes since it was first contributed. Over the coarse of development the code has deteriorated a bit. This is not to blame the contributors to the codebase. The codebase and overall problem is complicated and already hard enough to understand.
I have been looking to implement some upcoming changes that are being proposed for the OSGi R7 specification. Before I start that work I have been spending significant time scrubbing the resolver code and trying to make it a little more understandable. Here are the main things I have done:
1) Create a common code path for dynamic resolution and regular resolution.
2) Extract common code and greatly reduce the number of lines contained in complicated do/while loops.
3) Make proper use of the existing ResolveSession class to keep track of state during the resolution process. This keeps the maintenance of state in one place. The code had evolved into many separate options being passed around to methods, each maintaining some kind of state.