Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

adamwth
Copy link

@adamwth adamwth commented Sep 13, 2018

No description provided.

@JiaqingTan
Copy link

Good stuff! Proper coding standards followed!

Copy link

@teowz46 teowz46 left a 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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to change documentation?

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.*;
Copy link

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.

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.

Copy link

@liliwei25 liliwei25 left a 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.

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) {

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) {

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.*;

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants