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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: Functor
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: