Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-738

The last assertNull in IterableUtilsTest.find is redundant

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4
    • Fix Version/s: 4.5
    • Component/s: Iterator
    • Labels:
      None

      Description

      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.

      try {
          assertNull(IterableUtils.find(iterableA, null));
          fail("expecting NullPointerException");
      } catch (final NullPointerException npe) {
          // expected
      }
      

        Attachments

          Activity

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              prodigysov Pengyu Nie

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                  Issue deployment