...
This noncompliant code example contains packages named account and user that consist of the classes AccountHolder, User, and UserDetails respectively. The class UserDetails extends from AccountHolder because a user is a kind of account holder. The class AccountHolder depends on a non-static nonstatic utility method defined in the User class. Likewise, the UserDetails depends on AccountHolder by extending it.
...
Cyclic dependencies between packages can result in fragile builds. A security vulnerability in a package can easily percolate to other packages.
Bibliography
...
...
Section 1.2.5, "Acyclic Dependencies Principle" | |
Chapter 1, "OO Principles and Patterns" |