Skip to content

Commit

Permalink
Fixed parseInt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jing-xuan committed Nov 11, 2019
1 parent f093fb9 commit c90b063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/logic/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private static Command parseTaskEdit(String userInput) throws FarmioException {
if (matcher.find()) {
int taskID = 0;
try {
Integer.parseInt(matcher.group("index"));
taskID = Integer.parseInt(matcher.group("index"));
} catch (NumberFormatException e) {
throw new FarmioException("Your number is too large");
}
Expand All @@ -350,7 +350,7 @@ private static Command parseTaskInsert(String userInput) throws FarmioException
if (matcher.find()) {
int taskID = 0;
try {
Integer.parseInt(matcher.group("id"));
taskID = Integer.parseInt(matcher.group("id"));
} catch (NumberFormatException e) {
throw new FarmioException("Your number is too large!");
}
Expand Down

0 comments on commit c90b063

Please sign in to comment.