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

simplified MapUtil.copy #796

Merged
merged 2 commits into from
Dec 27, 2018
Merged

simplified MapUtil.copy #796

merged 2 commits into from
Dec 27, 2018

Conversation

littleaj
Copy link
Contributor

Mostly simplifying the caller side since each caller checked for null/empty. Plus, copy from source to target is a nop if it's null or empty, so why not just check for that in the method.

public ExpectedException expected = ExpectedException.none();

@Test
public void targetCannotBeNullInCopy() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to add the coverage for this scenario.

Copy link
Contributor

@dhaval24 dhaval24 left a comment

Choose a reason for hiding this comment

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

LGTM

@littleaj littleaj merged commit 55637e1 into master Dec 27, 2018
@trask trask deleted the tweakMapUtil branch September 21, 2020 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants