You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Pengyu Nie (Jira)" <ji...@apache.org> on 2019/12/10 20:41:00 UTC
[jira] [Commented] (COLLECTIONS-738) The last assertNull in
IterableUtilsTest.find is redundant
[ https://issues.apache.org/jira/browse/COLLECTIONS-738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16992924#comment-16992924 ]
Pengyu Nie commented on COLLECTIONS-738:
----------------------------------------
Hi, just want to check if there is any update on this issue? Thanks
> The last assertNull in IterableUtilsTest.find is redundant
> ----------------------------------------------------------
>
> Key: COLLECTIONS-738
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-738
> Project: Commons Collections
> Issue Type: Test
> Components: Iterator
> Reporter: Pengyu Nie
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The last assertNull in IterableUtilsTest.find (line 277, as shown
> below), is redundant and confusing; it will not be invoked because
> IterableUtils.find(*, null) should not return any value but just throw
> NullPointerException. I will make a PR to clarify this.
> {code:java}
> try {
> assertNull(IterableUtils.find(iterableA, null));
> fail("expecting NullPointerException");
> } catch (final NullPointerException npe) {
> // expected
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)