Skip to content

simplified MapUtil.copy#796

Merged
littleaj merged 2 commits into
masterfrom
tweakMapUtil
Dec 27, 2018
Merged

simplified MapUtil.copy#796
littleaj merged 2 commits into
masterfrom
tweakMapUtil

Conversation

@littleaj

Copy link
Copy Markdown
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
Copy Markdown
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.

@dhaval24 dhaval24 left a comment

Copy link
Copy Markdown
Contributor

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