geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Weber <webe...@gmail.com>
Subject Re: java.util.concurrent.ExecutorService changes between Java 5 and 6
Date Thu, 20 Nov 2008 09:14:06 GMT

What about some abominable reflection hacks?

Juergen


Jarek Gawor-2 wrote:
> 
> The java.util.concurrent.ExecutorService interface was slightly
> changed between Java 5 and Java 6: Here's an example:
> 
> Java 5: invokeAll(Collection<Callable<T>> tasks)
> 
> Java 6: invokeAll(Collection<? extends Callable<T>> tasks)
> 
> Here's more info on the change:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6267833
> 
> This change causes problems in the concurrent module. The code in the
> concurrent module extends and implements the Java 5 ExecutorService
> interface. However, since the interface was changed in Java 6, the
> concurrent module will not build on Java 6. The compiler complains
> that these changed methods are not implemented. And you can't define
> both style of these methods in the same class because they have the
> same erasure. Given our recent discussion on supporting Java 5 and 6,
> I think I will need to make the concurrent module Java 5 or Java 6
> specific. That is, for example, the module would be built on Java 6
> but not built on Java 5.
> 
> I was wondering if somebody had a better idea how to deal with this
> and/or how to support both Java versions.
> 
> Thanks,
> Jarek
> 
> 

-- 
View this message in context: http://www.nabble.com/java.util.concurrent.ExecutorService-changes-between-Java-5-and-6-tp20594884s134p20597470.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Mime
View raw message