Skip to content

Commit

Permalink
Remove assert lines
Browse files Browse the repository at this point in the history
  • Loading branch information
muller317 committed Nov 7, 2024
1 parent 0e24323 commit 062eb4e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public AddCommand(Person person) {

@Override
public CommandResult execute(Model model) throws CommandException {
assert model != null : "Model should not be null when executing AddCommand";
requireNonNull(model);

if (model.hasPerson(toAdd)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ public AddCommand parse(String args) throws ParseException {

// Parse VIP status; default to false if not provided
boolean isVip = Boolean.parseBoolean(argMultimap.getValue(PREFIX_VIP).orElse(DEFAULT_VIP));

// Assert that VIP status is set to default if not provided
assert isVip == Boolean.parseBoolean(DEFAULT_VIP) || argMultimap.getValue(PREFIX_VIP).isPresent()
: "VIP status should be default false when not provided";
Person person = new Person(name, phone, email, address, comment, tagList, isVip);

return new AddCommand(person);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/seedu/address/logic/parser/CliSyntax.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Contains Command Line Interface (CLI) syntax definitions common to multiple commands
*/
public class CliSyntax {

/* Prefix definitions */
public static final Prefix PREFIX_NAME = new Prefix("n/");
public static final Prefix PREFIX_PHONE = new Prefix("p/");
Expand Down

0 comments on commit 062eb4e

Please sign in to comment.