Remove the "/" adding code from EntityTypeFlag.

This commit is contained in:
Matthew Miller 2018-07-31 12:54:16 +10:00
parent dcdd0497d8
commit 66eb8fa553

View File

@ -40,10 +40,7 @@ protected EntityTypeFlag(String name) {
@Override @Override
public EntityType parseInput(FlagContext context) throws InvalidFlagFormat { public EntityType parseInput(FlagContext context) throws InvalidFlagFormat {
String input = context.getUserInput(); String input = context.getUserInput();
input = input.trim(); input = input.trim().toLowerCase();
if (!input.startsWith("/")) {
input = "/" + input;
}
EntityType entityType = unmarshal(input); EntityType entityType = unmarshal(input);
if (entityType == null) { if (entityType == null) {
throw new InvalidFlagFormat("Unknown entity type: " + input); throw new InvalidFlagFormat("Unknown entity type: " + input);