Skip to content

Commit

Permalink
Merge pull request #467 from RichDom2185/week13/remove-raw-types
Browse files Browse the repository at this point in the history
Remove raw types
  • Loading branch information
RichDom2185 authored Nov 5, 2022
2 parents 257266c + d052228 commit e97f8bb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/seedu/foodrem/logic/LogicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ public LogicManager(Model model, Storage storage) {
}

@Override
public CommandResult execute(String commandText) throws CommandException, ParseException {
public CommandResult<?> execute(String commandText) throws CommandException, ParseException {
logger.info("----------------[USER COMMAND][" + commandText + "]");

CommandResult commandResult;
CommandResult<?> commandResult;
Command command = foodRemParser.parseCommand(commandText);
commandResult = command.execute(model);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/foodrem/logic/commands/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public abstract class Command {
* @return feedback message of the operation result for display
* @throws CommandException If an error occurs during command execution.
*/
public abstract CommandResult execute(Model model) throws CommandException;
public abstract CommandResult<?> execute(Model model) throws CommandException;
}
2 changes: 1 addition & 1 deletion src/main/java/seedu/foodrem/ui/CommandBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ public interface CommandExecutor {
*
* @see seedu.foodrem.logic.Logic#execute(String)
*/
CommandResult execute(String commandText) throws CommandException, IllegalArgumentException;
CommandResult<?> execute(String commandText) throws CommandException, IllegalArgumentException;
}
}
2 changes: 1 addition & 1 deletion src/test/java/seedu/foodrem/logic/LogicManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void execute_storageThrowsIoException_throwsCommandException() {
*/
private void assertCommandSuccess(String inputCommand, String expectedMessage,
Model expectedModel) throws CommandException, ParseException {
CommandResult result = logic.execute(inputCommand);
CommandResult<?> result = logic.execute(inputCommand);
assertEquals(expectedMessage, result.getOutput());
assertEquals(expectedModel, model);
}
Expand Down

0 comments on commit e97f8bb

Please sign in to comment.