diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 6a5341b6f4c7..a9671a144efd 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -356,6 +356,25 @@ + + + + + + diff --git a/src/main/java/seedu/address/commons/util/JsonUtil.java b/src/main/java/seedu/address/commons/util/JsonUtil.java index 8ecd614f550a..8ef609f055df 100644 --- a/src/main/java/seedu/address/commons/util/JsonUtil.java +++ b/src/main/java/seedu/address/commons/util/JsonUtil.java @@ -60,7 +60,7 @@ public static Optional readJsonFile( requireNonNull(filePath); if (!Files.exists(filePath)) { - logger.info("Json file " + filePath + " not found"); + logger.info("Json file " + filePath + " not found"); return Optional.empty(); } diff --git a/src/main/java/seedu/address/model/person/Email.java b/src/main/java/seedu/address/model/person/Email.java index 4a8283a20002..38a7629e9a2d 100644 --- a/src/main/java/seedu/address/model/person/Email.java +++ b/src/main/java/seedu/address/model/person/Email.java @@ -9,7 +9,7 @@ */ public class Email { - private static final String SPECIAL_CHARACTERS = "!#$%&'*+/=?`{|}~^.-"; + private static final String SPECIAL_CHARACTERS = "!#$%&'*+/=?`{|}~^.-"; public static final String MESSAGE_EMAIL_CONSTRAINTS = "Emails should be of the format local-part@domain " + "and adhere to the following constraints:\n" + "1. The local-part should only contain alphanumeric characters and these special characters, excluding " diff --git a/src/main/java/seedu/address/storage/XmlAddressBookStorage.java b/src/main/java/seedu/address/storage/XmlAddressBookStorage.java index 8af60be0dc5d..ecf0e7ec23a8 100644 --- a/src/main/java/seedu/address/storage/XmlAddressBookStorage.java +++ b/src/main/java/seedu/address/storage/XmlAddressBookStorage.java @@ -47,7 +47,7 @@ public Optional readAddressBook(Path filePath) throws DataC requireNonNull(filePath); if (!Files.exists(filePath)) { - logger.info("AddressBook file " + filePath + " not found"); + logger.info("AddressBook file " + filePath + " not found"); return Optional.empty(); } diff --git a/src/test/java/guitests/GuiRobot.java b/src/test/java/guitests/GuiRobot.java index f4e0700b22f7..7f3031fbef16 100644 --- a/src/test/java/guitests/GuiRobot.java +++ b/src/test/java/guitests/GuiRobot.java @@ -103,7 +103,7 @@ public int getNumberOfWindowsShown(String stageTitle) { */ public Stage getStage(String stageTitle) { Optional targetStage = listTargetWindows().stream() - .filter(Stage.class::isInstance) // checks that the window is of type Stage + .filter(Stage.class::isInstance) // checks that the window is of type Stage .map(Stage.class::cast) .filter(stage -> stage.getTitle().equals(stageTitle)) .findFirst(); diff --git a/src/test/java/seedu/address/commons/core/VersionTest.java b/src/test/java/seedu/address/commons/core/VersionTest.java index c3014d633d27..7601efa25893 100644 --- a/src/test/java/seedu/address/commons/core/VersionTest.java +++ b/src/test/java/seedu/address/commons/core/VersionTest.java @@ -56,56 +56,56 @@ public void versionComparable_validVersion_compareToIsCorrect() { // Tests equality one = new Version(0, 0, 0, true); - another = new Version(0, 0, 0, true); + another = new Version(0, 0, 0, true); assertTrue(one.compareTo(another) == 0); one = new Version(11, 12, 13, false); - another = new Version(11, 12, 13, false); + another = new Version(11, 12, 13, false); assertTrue(one.compareTo(another) == 0); // Tests different patch one = new Version(0, 0, 5, false); - another = new Version(0, 0, 0, false); + another = new Version(0, 0, 0, false); assertTrue(one.compareTo(another) > 0); // Tests different minor one = new Version(0, 0, 0, false); - another = new Version(0, 5, 0, false); + another = new Version(0, 5, 0, false); assertTrue(one.compareTo(another) < 0); // Tests different major one = new Version(10, 0, 0, true); - another = new Version(0, 0, 0, true); + another = new Version(0, 0, 0, true); assertTrue(one.compareTo(another) > 0); // Tests high major vs low minor one = new Version(10, 0, 0, true); - another = new Version(0, 1, 0, true); + another = new Version(0, 1, 0, true); assertTrue(one.compareTo(another) > 0); // Tests high patch vs low minor one = new Version(0, 0, 10, false); - another = new Version(0, 1, 0, false); + another = new Version(0, 1, 0, false); assertTrue(one.compareTo(another) < 0); // Tests same major minor different patch one = new Version(2, 15, 0, false); - another = new Version(2, 15, 5, false); + another = new Version(2, 15, 5, false); assertTrue(one.compareTo(another) < 0); // Tests early access vs not early access on same version number one = new Version(2, 15, 0, true); - another = new Version(2, 15, 0, false); + another = new Version(2, 15, 0, false); assertTrue(one.compareTo(another) < 0); // Tests early access lower version vs not early access higher version compare by version number first one = new Version(2, 15, 0, true); - another = new Version(2, 15, 5, false); + another = new Version(2, 15, 5, false); assertTrue(one.compareTo(another) < 0); // Tests early access higher version vs not early access lower version compare by version number first one = new Version(2, 15, 0, false); - another = new Version(2, 15, 5, true); + another = new Version(2, 15, 5, true); assertTrue(one.compareTo(another) < 0); } @@ -124,11 +124,11 @@ public void versionComparable_validVersion_equalIsCorrect() { Version another; one = new Version(0, 0, 0, false); - another = new Version(0, 0, 0, false); + another = new Version(0, 0, 0, false); assertTrue(one.equals(another)); one = new Version(100, 191, 275, true); - another = new Version(100, 191, 275, true); + another = new Version(100, 191, 275, true); assertTrue(one.equals(another)); } diff --git a/src/test/java/seedu/address/commons/util/AppUtilTest.java b/src/test/java/seedu/address/commons/util/AppUtilTest.java index 8a6fe5fcb7d6..b81493f4784b 100644 --- a/src/test/java/seedu/address/commons/util/AppUtilTest.java +++ b/src/test/java/seedu/address/commons/util/AppUtilTest.java @@ -42,6 +42,6 @@ public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() String errorMessage = "error message"; thrown.expect(IllegalArgumentException.class); thrown.expectMessage(errorMessage); - AppUtil.checkArgument(false, errorMessage); + AppUtil.checkArgument(false, errorMessage); } } diff --git a/src/test/java/seedu/address/commons/util/StringUtilTest.java b/src/test/java/seedu/address/commons/util/StringUtilTest.java index 168bdb93c0d3..c0bbca33e188 100644 --- a/src/test/java/seedu/address/commons/util/StringUtilTest.java +++ b/src/test/java/seedu/address/commons/util/StringUtilTest.java @@ -42,7 +42,7 @@ public void isUnsignedPositiveInteger() { // EP: numbers with white space assertFalse(StringUtil.isNonZeroUnsignedInteger(" 10 ")); // Leading/trailing spaces - assertFalse(StringUtil.isNonZeroUnsignedInteger("1 0")); // Spaces in the middle + assertFalse(StringUtil.isNonZeroUnsignedInteger("1 0")); // Spaces in the middle // EP: number larger than Integer.MAX_VALUE assertFalse(StringUtil.isNonZeroUnsignedInteger(Long.toString(Integer.MAX_VALUE + 1))); diff --git a/src/test/java/seedu/address/logic/parser/EditCommandParserTest.java b/src/test/java/seedu/address/logic/parser/EditCommandParserTest.java index 24c138b41a7f..6dd59ee42d45 100644 --- a/src/test/java/seedu/address/logic/parser/EditCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/EditCommandParserTest.java @@ -168,7 +168,7 @@ public void parse_oneFieldSpecified_success() { @Test public void parse_multipleRepeatedFields_acceptsLast() { Index targetIndex = INDEX_FIRST_PERSON; - String userInput = targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + String userInput = targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND; diff --git a/src/test/java/seedu/address/model/person/EmailTest.java b/src/test/java/seedu/address/model/person/EmailTest.java index 10187e8eb884..ecbd0ee50208 100644 --- a/src/test/java/seedu/address/model/person/EmailTest.java +++ b/src/test/java/seedu/address/model/person/EmailTest.java @@ -51,12 +51,12 @@ public void isValidEmail() { // valid email assertTrue(Email.isValidEmail("PeterJack_1190@example.com")); - assertTrue(Email.isValidEmail("a@bc")); // minimal - assertTrue(Email.isValidEmail("test@localhost")); // alphabets only + assertTrue(Email.isValidEmail("a@bc")); // minimal + assertTrue(Email.isValidEmail("test@localhost")); // alphabets only assertTrue(Email.isValidEmail("!#$%&'*+/=?`{|}~^.-@example.org")); // special characters local part - assertTrue(Email.isValidEmail("123@145")); // numeric local part and domain name + assertTrue(Email.isValidEmail("123@145")); // numeric local part and domain name assertTrue(Email.isValidEmail("a1+be!@example1.com")); // mixture of alphanumeric and special characters - assertTrue(Email.isValidEmail("peter_jack@very-very-very-long-example.com")); // long domain name - assertTrue(Email.isValidEmail("if.you.dream.it_you.can.do.it@example.com")); // long local part + assertTrue(Email.isValidEmail("peter_jack@very-very-very-long-example.com")); // long domain name + assertTrue(Email.isValidEmail("if.you.dream.it_you.can.do.it@example.com")); // long local part } } diff --git a/src/test/java/systemtests/ClearCommandSystemTest.java b/src/test/java/systemtests/ClearCommandSystemTest.java index 805a59784e29..fb01059d9fe4 100644 --- a/src/test/java/systemtests/ClearCommandSystemTest.java +++ b/src/test/java/systemtests/ClearCommandSystemTest.java @@ -27,7 +27,7 @@ public void clear() { /* Case: undo clearing address book -> original address book restored */ String command = UndoCommand.COMMAND_WORD; String expectedResultMessage = UndoCommand.MESSAGE_SUCCESS; - assertCommandSuccess(command, expectedResultMessage, defaultModel); + assertCommandSuccess(command, expectedResultMessage, defaultModel); assertSelectedCardUnchanged(); /* Case: redo clearing address book -> cleared */