[jboss-svn-commits] JBL Code SVN: r29541 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/concurrent.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 6 12:50:04 EDT 2009


Author: ge0ffrey
Date: 2009-10-06 12:50:04 -0400 (Tue, 06 Oct 2009)
New Revision: 29541

Modified:
   labs/jbossrules/trunk/drools-core/src/main/java/org/drools/concurrent/ExternalExecutorService.java
Log:
compilation error on jdk 6 (not on jdk 5) because the ExectutorService interface in java 6 follows the Joshua Bloch PECS pattern (so Collection<? extends Callable...> instead of just Collection<Callable...>)

Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/concurrent/ExternalExecutorService.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/concurrent/ExternalExecutorService.java	2009-10-06 16:18:07 UTC (rev 29540)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/concurrent/ExternalExecutorService.java	2009-10-06 16:50:04 UTC (rev 29541)
@@ -88,7 +88,7 @@
     /**
      * {@inheritDoc}
      */
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks,
+    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,
                                          long timeout,
                                          TimeUnit unit) throws InterruptedException {
         ExecutorService service = delegate.get();
@@ -103,7 +103,7 @@
     /**
      * {@inheritDoc}
      */
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks) throws InterruptedException {
+    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException {
         ExecutorService service = delegate.get();
         if ( service != null ) {
             return service.invokeAll( taskManager.trackTasks( tasks ) );
@@ -114,7 +114,7 @@
     /**
      * {@inheritDoc}
      */
-    public <T> T invokeAny(Collection<Callable<T>> tasks,
+    public <T> T invokeAny(Collection<? extends Callable<T>> tasks,
                            long timeout,
                            TimeUnit unit) throws InterruptedException,
                                          ExecutionException,
@@ -132,7 +132,7 @@
     /**
      * {@inheritDoc}
      */
-    public <T> T invokeAny(Collection<Callable<T>> tasks) throws InterruptedException,
+    public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException,
                                                          ExecutionException {
         ExecutorService service = delegate.get();
         if ( service != null ) {
@@ -345,7 +345,7 @@
          * 
          * @return the collection of ObservableCallable<T> tasks
          */
-        public <T> Collection<Callable<T>> trackTasks(Collection<Callable<T>> tasksToTrack) {
+        public <T> Collection<Callable<T>> trackTasks(Collection<? extends Callable<T>> tasksToTrack) {
             Collection<Callable<T>> results = new ArrayList<Callable<T>>( tasksToTrack.size() );
             for ( Callable<T> task : tasksToTrack ) {
                 results.add( trackTask( task ) );



More information about the jboss-svn-commits mailing list