tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1607841 - in /tomee/tomee/branches/tomee-1.7.x/container: openejb-concurrency-utilities-ee/src/test/java/org/apache/openejb/concurrencyutilities/test/ openejb-core/src/main/java/org/apache/openejb/async/
Date Fri, 04 Jul 2014 12:24:25 GMT
Author: andygumbrecht
Date: Fri Jul  4 12:24:24 2014
New Revision: 1607841

URL: http://svn.apache.org/r1607841
Log:
Need to know where this null comes from?

Modified:
    tomee/tomee/branches/tomee-1.7.x/container/openejb-concurrency-utilities-ee/src/test/java/org/apache/openejb/concurrencyutilities/test/ManagedScheduledExecutorServiceTest.java
    tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java

Modified: tomee/tomee/branches/tomee-1.7.x/container/openejb-concurrency-utilities-ee/src/test/java/org/apache/openejb/concurrencyutilities/test/ManagedScheduledExecutorServiceTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/container/openejb-concurrency-utilities-ee/src/test/java/org/apache/openejb/concurrencyutilities/test/ManagedScheduledExecutorServiceTest.java?rev=1607841&r1=1607840&r2=1607841&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/container/openejb-concurrency-utilities-ee/src/test/java/org/apache/openejb/concurrencyutilities/test/ManagedScheduledExecutorServiceTest.java
(original)
+++ tomee/tomee/branches/tomee-1.7.x/container/openejb-concurrency-utilities-ee/src/test/java/org/apache/openejb/concurrencyutilities/test/ManagedScheduledExecutorServiceTest.java
Fri Jul  4 12:24:24 2014
@@ -36,6 +36,7 @@ import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 public class ManagedScheduledExecutorServiceTest {
@@ -120,8 +121,10 @@ public class ManagedScheduledExecutorSer
         assertEquals("Counter did not count down in time", 0L, counter.getCount());
 
         final boolean done = future.isDone();
+        assertNotNull("Bad done value for future: " + future, done);
         assertTrue(done);
         final boolean cancelled = future.isCancelled();
+        assertNotNull("Bad cancelled value for future: " + future, cancelled);
         assertTrue(cancelled);
     }
 

Modified: tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java?rev=1607841&r1=1607840&r2=1607841&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
(original)
+++ tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
Fri Jul  4 12:24:24 2014
@@ -244,10 +244,7 @@ public class AsynchronousPool {
 
         @Override
         public boolean isDone() {
-            if (canceled) {
-                return false;
-            }
-            return target.isDone();
+            return !canceled && target.isDone();
         }
     }
 }



Mime
View raw message