[concurrency-interest] Incompatible API change between Java 5 and Java 6?

Péter Kovács peter.kovacs.1.0rc at gmail.com
Fri Apr 10 02:20:57 EDT 2009


It appears that the signature of invokeAny and invokeAll in
ExecutorService has changed from Java 5 and Java 6. I want to
implement this interface, but I cannot find a signature which is
accepted by both versions of javac. I have tried this one (accepted by
Java 5 only):

public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks)
            throws InterruptedException

and this one  (accepted by Java 6 only):

public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
            throws InterruptedException

Any suggestion appreciated.


Generics: much ado about nothing.

More information about the Concurrency-interest mailing list