Simple answer
It's not a cyclic problem; it's a different type of coupling issue because BinaryObserver is a concrete class.
Detailed answer
The answer below is taken from the book Java Application Architecture by Kirk Knoernschild.
Break cycle at the class level
It's not a cyclic problem; it's a different type of coupling issue
BinaryObserveris a concrete class. (page 52)
Break cycle at the module level
To have an acyclic dependency between modules, we must move Subject and Observer in the same module. (page 54, figure 4.4 ans figure 4.5)
Conclusion
- Observer design pattern has acyclic dependencies between classes
- Obersver design pattern has acyclic dependencies between modules
The type of coupling
In the schema 1 and 2 we interting the relation, dependency inversion.
Interving the relationships allows us to deploy
package1package2module independent of thepackage2package1module. But I'd like to explore another option [...] the ability to test and deploy thepackage1package2module independently.
I can test and deploy
package2package1module independently. But if I want to test and deploy both modules independently [...] I need to completely eliminate the relationship altogether. (page 123 and figure 8.4)


