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

The last assertNull in IterableUtilsTest.find is redundant

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.4
    • 4.5.0-M1
    • Iterator
    • 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

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              prodigysov Pengyu Nie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              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