Made system commands case insensitive and reworked /dabr mechanism
This commit is contained in:
@ -37,7 +37,9 @@ public final class SystemCommandsMap {
|
||||
* @see SystemCommandsMap#isValidKey(String)
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public void add(String command, SystemCommand systemCommand) { if (isValidKey(command)) systemCommands.put(command, systemCommand); }
|
||||
public void add(String command, SystemCommand systemCommand) {
|
||||
if (isValidKey(command)) systemCommands.put(command.toLowerCase(), systemCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks if the input String is a key in the map and returns the
|
||||
@ -60,7 +62,7 @@ public final class SystemCommandsMap {
|
||||
* @return the wrapped system command, if present
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public Optional<SystemCommand> get(String input) { return Optional.ofNullable(systemCommands.get(getCommand(input))); }
|
||||
public Optional<SystemCommand> get(String input) { return Optional.ofNullable(systemCommands.get(getCommand(input.toLowerCase()))); }
|
||||
|
||||
/**
|
||||
* This method ensures that the "/" of a {@link SystemCommand} is stripped.<br>
|
||||
|
Reference in New Issue
Block a user