Skip to content

Commit

Permalink
Simplify if-else condition
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Y-Yan committed Nov 14, 2023
1 parent e97fd48 commit 717295c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/seedu/duke/data/Date.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ public void setRawData(String rawData, boolean NotAllowPast) throws IncorrectFor
if (date.isBefore(LocalDate.now())) {
throw new IncorrectFormatException("Target Deadline has passed! ");
}
standardString = this.toString();
return;
} else {
standardString = this.toString();
return;
}
standardString = this.toString();
return;
} catch (IncorrectFormatException ide) {
throw new IncorrectFormatException("Target Deadline has passed! ");
} catch (Exception exception) {
Expand Down

0 comments on commit 717295c

Please sign in to comment.