Skip to content

Commit

Permalink
Fix checkstyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NatLeong committed Mar 24, 2024
1 parent 46cd263 commit cdc3539
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/main/java/seedu/address/logic/parser/ReadCommandParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NRIC;

import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.commands.ReadCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.Nric;
Expand All @@ -20,19 +18,13 @@ public class ReadCommandParser implements Parser<ReadCommand> {
*/
public ReadCommand parse(String args) throws ParseException {
requireNonNull(args);
String trimmed_Arg = args.trim();
if (trimmed_Arg.isEmpty()) {
String trimmed_Args = args.trim();
if (trimmed_Args.isEmpty()) {
throw new ParseException(
String.format(MESSAGE_INVALID_COMMAND_FORMAT, ReadCommand.MESSAGE_NOT_READ));
}
//ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NRIC);

//if (argMultimap.getValue(PREFIX_NRIC).isEmpty()) {
// throw new ParseException(ReadCommand.MESSAGE_NOT_READ);
//}

//return new ReadCommand(ParserUtil.parseNric(argMultimap.getValue(PREFIX_NRIC).get()));
return new ReadCommand(new Nric(trimmed_Arg));
return new ReadCommand(new Nric(trimmed_Args));
}
}

0 comments on commit cdc3539

Please sign in to comment.