Skip to content

[COLLECTIONS-600] Null-safe implementation of CollectionUtils#isEqualCollection#22

Closed
jonasholtkamp wants to merge 2 commits intoapache:trunkfrom
jonasholtkamp:trunk
Closed

[COLLECTIONS-600] Null-safe implementation of CollectionUtils#isEqualCollection#22
jonasholtkamp wants to merge 2 commits intoapache:trunkfrom
jonasholtkamp:trunk

Conversation

@jonasholtkamp
Copy link

@jonasholtkamp jonasholtkamp commented May 25, 2017

Other Commons *Utils classes as StringUtils etc. feature null-safe methods. With this Pull Request now CollectionUtils#isEqualCollection does, too.

Fixes issue COLLECTIONS-600.

@coveralls
Copy link

coveralls commented May 25, 2017

Coverage Status

Coverage decreased (-0.02%) to 85.124% when pulling 06f64ca on jonasholtkamp:trunk into 441df91 on apache:trunk.

public static <E> boolean isEqualCollection(final Collection<? extends E> a,
final Collection<? extends E> b,
final Equator<? super E> equator) {
if(a == null && b == null) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead of repeating the checks here, we could remove the .size() checks, leaving it to be checked by the following call to the overloaded isEqualCollection.

Copy link
Author

Choose a reason for hiding this comment

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

Good idea. Will do.

@coveralls
Copy link

coveralls commented May 27, 2017

Coverage Status

Coverage decreased (-0.004%) to 85.14% when pulling bdaef5d on jonasholtkamp:trunk into 441df91 on apache:trunk.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 85.155% when pulling bdaef5d on jonasholtkamp:trunk into 441df91 on apache:trunk.

@kinow
Copy link
Member

kinow commented May 28, 2017

Ready to be merged IMO. Just waiting for feedback on this e-mail thread http://commons.markmail.org/thread/dwgs5j3bp3vryb24

Feel free to reply there if you would like to cast your opinion, or on COLLECTIONS-604

Cheers
Bruno

@asfgit asfgit closed this Jul 17, 2017
@chtompki
Copy link
Member

@jonasholtkamp - Do you mind rebasing to master and re-opening this pull request?

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.

5 participants