Skip to content

Commit

Permalink
Update to codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
yooplo committed Oct 2, 2024
1 parent b9668ad commit 74bd793
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ public Command parseCommand(String userInput) throws ParseException {
throw new ParseException(MESSAGE_UNKNOWN_COMMAND);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ private static List<PrefixPosition> findPrefixPositions(String argsString, Prefi
* {@code argsString} starting from index {@code fromIndex}. An occurrence
* is valid if there is a whitespace before {@code prefix}. Returns -1 if no
* such occurrence can be found.
*
* E.g if {@code argsString} = "e/hip/900", {@code prefix} = "p/" and
* {@code fromIndex} = 0, this method returns -1 as there are no valid
* occurrences of "p/" with whitespace before it. However, if
Expand Down Expand Up @@ -144,5 +143,4 @@ Prefix getPrefix() {
return prefix;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ public DeleteCommand parse(String args) throws ParseException {
String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE), pe);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;

import java.util.Arrays;

import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.NameContainsKeywordsPredicate;
Expand All @@ -16,6 +15,7 @@ public class FindCommandParser implements Parser<FindCommand> {
/**
* Parses the given {@code String} of arguments in the context of the FindCommand
* and returns a FindCommand object for execution.
*
* @throws ParseException if the user input does not conform the expected format
*/
public FindCommand parse(String args) throws ParseException {
Expand All @@ -24,9 +24,7 @@ public FindCommand parse(String args) throws ParseException {
throw new ParseException(
String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));
}

String[] nameKeywords = trimmedArgs.split("\\s+");

return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* As we are only doing white-box testing, our test cases do not cover path variations
* outside of the DeleteCommand code. For example, inputs "1" and "1 abc" take the
* outside the DeleteCommand code. For example, inputs "1" and "1 abc" take the
* same path through the DeleteCommand, and therefore we test only one of them.
* The path variation for those two cases occur inside the ParserUtil, and
* therefore should be covered by the ParserUtilTest.
Expand Down

0 comments on commit 74bd793

Please sign in to comment.