Bugzilla – Bug 5841
StateMachine is unreadable and hardly maintainable
Last modified: 2008-02-06 14:20:05
You need to
before you can comment on or make changes to this bug.
Change the 3000+ line unreadable and unmaintainable StateMachine into a
small controller (StateMachine) and a bunch of handlers each being responsible
for processing a certain internal state. This breaks up the StateMachine into
smaller and more readable pieces.
During initialization of the StateMachine all elements of the Enum
are read and a handler per internal state is instantiated and stored in a
handler array. If it comes to processing of a resource the appropriate handler
looked up in this array.