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

Implement Blank class to allow for optional Person fields #219

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

Conversation

flyingsalsa
Copy link

No description provided.

Copy link

@Kitty-001 Kitty-001 left a comment

Choose a reason for hiding this comment

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

LGTM!

} else {
address = new Address(new Blank());
}

Choose a reason for hiding this comment

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

I feel the modifications to ParserUtil is enough to handle these. Maybe can do something like:

Phone phone = ParserUtil.parsePhone(argumentMultimap.getValue(PREFIX_PHONE).orElse(""));

Copy link
Author

Choose a reason for hiding this comment

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

Hmm i didnt realise it was an optional

@@ -10,7 +10,7 @@ public class EmailTest {

@Test
public void constructor_null_throwsNullPointerException() {
assertThrows(NullPointerException.class, () -> new Email(null));
assertThrows(NullPointerException.class, () -> new Email((String) null));

Choose a reason for hiding this comment

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

What is this for?

Copy link
Author

Choose a reason for hiding this comment

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

to call the correct constructor.

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