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:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user