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

Collections does not compile with openjdk 1.6.0_24

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • 4.0-alpha1, 4.0
    • None
    • None

    Description

      There are several classes for which generic type inference does not work when using the openjdk 1.6.0_24 compiler:

      [ERROR] /home/tn/workspace/apache/commons-collections/src/main/java/org/apache/commons/collections/functors/OnePredicate.java:[66,38] invalid inferred types for T; actual arguments do not conforms to inferred formal arguments
      [ERROR] required: org.apache.commons.collections.Predicate<? super java.lang.Object>[]
      [ERROR] found: org.apache.commons.collections.Predicate<? super T>[]
      

      This is mainly due to re-using a method argument that is restricted by Predicate<? super T> to assign methods results of type Predicate<T>.

      The eclipse compiler does not report an error in these cases.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tn Thomas Neidhart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: