Skip to content

Commit

Permalink
Require non null
Browse files Browse the repository at this point in the history
  • Loading branch information
nixonwidjaja committed Nov 2, 2023
1 parent ac1ed4b commit cfaff40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/model/person/Month.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package seedu.address.model.person;

import static java.util.Objects.requireNonNull;
import static seedu.address.commons.util.AppUtil.checkArgument;

/**
Expand All @@ -26,6 +27,7 @@ public class Month {
* @param monthValue the integer representation of the intended month.
*/
public Month(int monthValue) {
requireNonNull(monthValue);
checkArgument(monthValue > 0 && monthValue < 13, INVALID_MONTH);
month = monthValue;
}
Expand Down

0 comments on commit cfaff40

Please sign in to comment.