Skip to content

Commit

Permalink
FINAL FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Lam committed Nov 11, 2019
1 parent 23a42d0 commit 942f9a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class RemoveTagFromStudyPlanCommandParser implements Parser<RemoveTagFrom
*/
public RemoveTagFromStudyPlanCommand parse(String args) throws ParseException {
String[] tokens = args.trim().split(" ");
if (tokens.length < 1 || !tokens[0].matches("\\d")) {
if (tokens.length < 1 || !tokens[0].matches("\\d+")) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
RemoveTagFromStudyPlanCommand.MESSAGE_USAGE));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class TagStudyPlanCommandParser implements Parser<TagStudyPlanCommand> {
public TagStudyPlanCommand parse(String args) throws ParseException {
String[] tokens = args.trim().split(" ");
if (tokens.length < 2 || !PriorityTagType.isValidPriorityTagString(tokens[0])
|| !tokens[1].matches("\\d")) {
|| !tokens[1].matches("\\d+")) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
TagStudyPlanCommand.MESSAGE_USAGE));
}
Expand Down

0 comments on commit 942f9a7

Please sign in to comment.