Refactored the code for better understandability, maintainability and testability by separating concerns via delegating some functions to other classes and injecting them in the main handler class.
Simplified the code logic whereas possible without hurting the general structure much.
Note: Would be great if we could utilise Java 17 to start taking advantage of new "switch" for a more data oriented approach instead of if-else.
Refactored the code for better understandability, maintainability and testability by separating concerns via delegating some functions to other classes and injecting them in the main handler class.
Simplified the code logic whereas possible without hurting the general structure much.
Note: Would be great if we could utilise Java 17 to start taking advantage of new "switch" for a more data oriented approach instead of if-else.