geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor" <jga...@gmail.com>
Subject Re: java.util.concurrent.ExecutorService changes between Java 5 and 6
Date Mon, 24 Nov 2008 21:15:43 GMT
What do you mean exactly? The problem is not with calling the API but
with extending/implementing the API.

Jarek

On Thu, Nov 20, 2008 at 4:14 AM, Juergen Weber <weberjn@gmail.com> wrote:
>
> 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