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

CollectionUtils.filter(..) broken with blank Collections.singleton

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 4.4
    • None
    • Collection
    • None

    Description

      When using CollectionUtils.filter(..), if the passed collection is initialized with jdk Collections.singleton(..) and only contains an isBlank(..) string, the method will throw an exception instead of removing blank item as expected. Tested with commons-collections:4.4 and java8.

      All can be resumed with

      CollectionUtils.filter(Collections.singleton(" "), StringUtils::isNotBlank); 

      Attachments

        Activity

          People

            Unassigned Unassigned
            noname713705 noname713705
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: