Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Remove cyclic dependencies #115

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

jimbethancourt
Copy link
Contributor

I have removed a number of cyclic dependencies identified by the SonarGraph and Structure 101 Workspace tools. These changes should improve the long-term maintainability of the codebase.

If you're not comfortable with all of these changes, let me know which commits you would like to keep and which you would like to discard and I should be able to cherry pick into another branch and submit another PR.

Removed 3 Major Sonar issues that involve generic type parameterization and do not require significant code changes
Resolved 14 minor Sonar issues that only required very minor changes.
No calls between classes were altered and no new methods were introduced.
Moving GsonHelper into the json package since it is an implementation detail that should be hidden.  This follows the same approach as JaxbHelper in the com.sandboni.core.engine.render.file.xml package
Reduced class visibility of JaxbHelper since it shouldn't be used outside of the xml package
Moved the ClassVisitor interface into the visitors package since all implementing classes are inside of the visitors package or the http sub-package.
…ackages

Removed dependency cycle between the operation and executor packages by moving the GraphOperation and OperationResult interfaces to the sta package since both of these interfaces are used in both the sta.graph and sta.operation packages.
Removed dependency cycle between the finder, scanner, executor, contract, sta, graph, and vertex packages by moving the ExtensionType enum to the common package.  The ExtensionType enum is used by several packages in the finder package, and is also used in the sta.graph.vertex package.  Placing ExtensionType in the top level core.engine package creates a large dependency cycle across 24 packages.
…kages.

Removed dependency cycle between the analyzer, engine, and filter packages by moving the analyzer package under the engine package directly instead of having it live in the sta package since the ContextAnalyzer class is used in the Processor class and refers to the VertexFilterFactory class.  The ContextAnalyzer class could just as easily live directly in the engine package and could be moved there if desired.
Removed dependency cycle between the sta and contract packages by moving the Finder interface to the sta package.  Finder and Context are always used together and Finder takes Context as an argument, and having them in the same package is more conceptually cohesive.
…ethodVisitor.

Removed dependency cycle between ImplementingClassVisitor and BridgeMethodVisitor.  They were both calling methods in the other class, creating a dependency cycle.
Removed package cycle between visitors and http by moving the HttpLinkHelper class to the visitors package.  The HttpLinkHelper class uses the MethodUtils class in the visitors package, and the AnnotationValueHandler class and RedirectVisitor class in the visitors package use HttpLinkHelper, creating the dependency cycle.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant