Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Nightly Builds
-
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.