iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
88.22k stars 26.18k forks source link

Refactor Commander #2978

Closed iluwatar closed 3 weeks ago

iluwatar commented 4 weeks ago

Description

Commander pattern has some dead code and it should be refactored. At the moment it has 4 different App classes and main functions. Each App's main function only executes the success case, but not the failure cases (dead code).

Acceptance Criteria

Mayankchoudhary294 commented 4 weeks ago

Hello @iluwatar Do you mean to refactor all 5 App classes into one, with the main function executing both the success and failure cases?

iluwatar commented 4 weeks ago

Yes, I think that would make the example easier to use and understand.