-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[W5.7][F11-2]Chew Yong Soon #457
base: master
Are you sure you want to change the base?
Conversation
Good stuff! Proper coding standards followed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for a few small things
|
||
|
||
/** | ||
* Lists all persons in the address book to the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to change documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update your comments
import seedu.addressbook.commands.ListCommand; | ||
import seedu.addressbook.commands.ViewAllCommand; | ||
import seedu.addressbook.commands.ViewCommand; | ||
import seedu.addressbook.commands.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we allowed to do this? If not I think you may need to tweak the behaviour of Alt-Enter in Intellij if you wish to use the shortcut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use wild cards, show each import explicitly. Check coding convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job! 👍 Some coding standard issues.
|
||
|
||
/** | ||
* Lists all persons in the address book to the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update your comments
public CommandResult execute() { | ||
try { | ||
addressBook.sort((ReadOnlyPerson p1, ReadOnlyPerson p2) -> { | ||
switch (keyword) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the coding standard for switch statements
@@ -13,6 +13,9 @@ | |||
* Returns true if any of the given items are null. | |||
*/ | |||
public static boolean isAnyNull(Object... items) { | |||
if (items == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated code change?
import seedu.addressbook.commands.ListCommand; | ||
import seedu.addressbook.commands.ViewAllCommand; | ||
import seedu.addressbook.commands.ViewCommand; | ||
import seedu.addressbook.commands.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use wild cards, show each import explicitly. Check coding convention.
@@ -34,6 +34,15 @@ public void elementsAreUnique() throws Exception { | |||
assertNotUnique(null, 1, Integer.valueOf(1)); | |||
assertNotUnique(null, null); | |||
assertNotUnique(null, "a", "b", null); | |||
|
|||
// some empty objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated code changes? Please refrain for adding unrelated code changes to your future PRs
No description provided.