You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/11/29 17:18:00 UTC

[jira] [Work logged] (COLLECTIONS-738) The last assertNull in IterableUtilsTest.find is redundant

     [ https://issues.apache.org/jira/browse/COLLECTIONS-738?focusedWorklogId=351422&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351422 ]

ASF GitHub Bot logged work on COLLECTIONS-738:
----------------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Nov/19 17:17
            Start Date: 29/Nov/19 17:17
    Worklog Time Spent: 10m 
      Work Description: Prodigysov commented on pull request #121: [COLLECTIONS-738] Remove the redundant assertNull in IterableUtilsTest.find
URL: https://github.com/apache/commons-collections/pull/121
 
 
   As described in the JIRA issue [COLLECTIONS-738](https://issues.apache.org/jira/browse/COLLECTIONS-738)
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 351422)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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)