From 1914bd30751713fcdec3c8fd67759dc19ca2e43e Mon Sep 17 00:00:00 2001 From: Yi Hsuen Date: Thu, 3 Feb 2022 21:57:16 +0800 Subject: [PATCH] Add wildcard parameterized type IntelliJ throws a warning that assertParseSuccess and assertParseFailure parameter parser uses raw type for Parser. This warning is similar to javac -Xlint:rawtypes. Let's add a wildcard type parameter to Parser. --- .../seedu/address/logic/parser/CommandParserTestUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java b/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java index e4c335157..9bf1ccf1c 100644 --- a/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java +++ b/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java @@ -14,7 +14,8 @@ public class CommandParserTestUtil { * Asserts that the parsing of {@code userInput} by {@code parser} is successful and the command created * equals to {@code expectedCommand}. */ - public static void assertParseSuccess(Parser parser, String userInput, Command expectedCommand) { + public static void assertParseSuccess(Parser parser, String userInput, + Command expectedCommand) { try { Command command = parser.parse(userInput); assertEquals(expectedCommand, command); @@ -27,7 +28,7 @@ public static void assertParseSuccess(Parser parser, String userInput, Command e * Asserts that the parsing of {@code userInput} by {@code parser} is unsuccessful and the error message * equals to {@code expectedMessage}. */ - public static void assertParseFailure(Parser parser, String userInput, String expectedMessage) { + public static void assertParseFailure(Parser parser, String userInput, String expectedMessage) { try { parser.parse(userInput); throw new AssertionError("The expected ParseException was not thrown.");