Skip to content

Commit

Permalink
Revert "Duke Level-9: Making Find more specific"
Browse files Browse the repository at this point in the history
This reverts commit 00bdbb8.
  • Loading branch information
nicljr committed Feb 11, 2023
1 parent 00bdbb8 commit 3bceb3a
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/main/java/duke/command/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@ public class FindCommand extends Command {
public FindCommand(String textCmd) {
super(textCmd);
}

/**
* Produces a String for the GUI to read from.
* The String is the list of Tasks that contain that specific given keyword
*
* @param ui User Interface of Duke.
* @param storage storage of Duke.
* @param taskList task list containing all the tasks Duke is tracking.
* @return the String of all the tasks that contains the keyword.
*/

@Override
public String execute(Ui ui, Storage storage, TaskList taskList) throws DukeException {
String[] commandSplit = textCmd.split(" ");
Expand All @@ -31,8 +22,7 @@ public String execute(Ui ui, Storage storage, TaskList taskList) throws DukeExce
}

if (commandSplit.length == 1) {
throw new DukeException("The keyword for your Find Command cannot be blank!\n"
+ "Please follow this format: find {keyword}");
throw new DukeException("The keyword for your Find Command cannot be blank!\n");
}

String keyWord = textCmd.substring(5);
Expand Down

0 comments on commit 3bceb3a

Please sign in to comment.