Refactorings - prepare to remove FoundCommandResult

- Reduce tight coupling by passing list of available commands as param to CommandHandler
- Split command processing method into several smaller ones
- Remove unfinished logic for unlimited command arguments (reason: was not implemented and not used, probably needs another way to handle it once the need for it arises)
- Create test for CommandHandler
This commit is contained in:
ljacqu
2015-12-04 21:33:50 +01:00
parent 0c1589f93a
commit c78e12de04
9 changed files with 223 additions and 173 deletions
@@ -13,9 +13,7 @@ public final class CommandUtils {
}
public static int getMaxNumberOfArguments(CommandDescription command) {
return command.hasMaximumArguments()
? command.getArguments().size()
: -1;
return command.getArguments().size();
}
}