Skip to content

Commit

Permalink
Fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
nixonwidjaja committed Sep 29, 2023
1 parent ce68ed6 commit e13e3bd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ public EditCommand parse(String args) throws ParseException {
editPersonDescriptor.setSalary(ParserUtil.parseMoney(argMultimap.getValue(PREFIX_SALARY).get()));
}
if (argMultimap.getValue(PREFIX_CLAIM_BUDGET).isPresent()) {
editPersonDescriptor.setClaimBudget(ParserUtil.parseMoney(argMultimap.getValue(PREFIX_CLAIM_BUDGET).get()));
editPersonDescriptor.setClaimBudget(
ParserUtil.parseMoney(argMultimap.getValue(PREFIX_CLAIM_BUDGET).get()));
}
if (argMultimap.getValue(PREFIX_DEPARTMENT).isPresent()) {
editPersonDescriptor.setDepartment(ParserUtil.parseDepartment(argMultimap.getValue(PREFIX_DEPARTMENT).get()));
editPersonDescriptor.setDepartment(
ParserUtil.parseDepartment(argMultimap.getValue(PREFIX_DEPARTMENT).get()));
}
if (argMultimap.getValue(PREFIX_DOB).isPresent()) {
editPersonDescriptor.setDob(ParserUtil.parseDob(argMultimap.getValue(PREFIX_DOB).get()));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/logic/parser/ParserUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static Department parseDepartment(String department) throws ParseExceptio
}

/**
* Parses a {@code String dob into a {@code Birthday}.
* Parses a {@code String dob} into a {@code Birthday}.
* Leading and trailing whitespaces will be trimmed.
*
* @throws ParseException if the given {@code dob} is invalid.
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/seedu/address/storage/JsonAdaptedPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,17 @@ public Person toModelType() throws IllegalValueException {
final Money modelClaimBudget = new Money(claimBudget);

if (department == null) {
throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Department.class.getSimpleName()));
throw new IllegalValueException(
String.format(MISSING_FIELD_MESSAGE_FORMAT, Department.class.getSimpleName()));
}
if (!Department.isValidDepartment(department)) {
throw new IllegalValueException(Department.MESSAGE_CONSTRAINTS);
}
final Department modelDepartment = new Department(department);

if (dob == null) {
throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Birthday.class.getSimpleName()));
throw new IllegalValueException(
String.format(MISSING_FIELD_MESSAGE_FORMAT, Birthday.class.getSimpleName()));
}
if (!Birthday.isValidDob(dob)) {
throw new IllegalValueException(Birthday.MESSAGE_CONSTRAINTS);
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package seedu.address.ui;

import java.util.Comparator;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import seedu.address.model.person.Person;
Expand Down

0 comments on commit e13e3bd

Please sign in to comment.