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

PredicateUtils (all|any)Predicate type misbehaviour Array vs. Collection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0
    • 4.1
    • Functor
    • None

    Description

      Migrating from collections-generic to collections4 we encountered a type problem with PredicateUtils. When you look at the method anyPredicate(), the signature with array is typed with "Predicate<? super T>" whereas the signature with Collection is typed "? extends Predicate<T>", so the both methods are not equivalent.
      We think both methods should have the same types, so it would not break compatibility with a lot of legacy code.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fj Frank Jakop
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: