deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject deltaspike git commit: on jdk 7 COMPLETION_STAGE is null
Date Thu, 17 Mar 2016 11:42:13 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master dbd4fb78e -> 3de3a3b67


on jdk 7 COMPLETION_STAGE is null


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/3de3a3b6
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/3de3a3b6
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/3de3a3b6

Branch: refs/heads/master
Commit: 3de3a3b674187a6cd4b2c9fc80a5641755e9e63b
Parents: dbd4fb7
Author: Romain manni-Bucau <rmannibucau@gmail.com>
Authored: Thu Mar 17 12:41:56 2016 +0100
Committer: Romain manni-Bucau <rmannibucau@gmail.com>
Committed: Thu Mar 17 12:41:56 2016 +0100

----------------------------------------------------------------------
 .../apache/deltaspike/core/impl/future/FutureableInterceptor.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/3de3a3b6/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/FutureableInterceptor.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/FutureableInterceptor.java
b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/FutureableInterceptor.java
index a1ae35b..4e04734 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/FutureableInterceptor.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/FutureableInterceptor.java
@@ -92,7 +92,8 @@ public class FutureableInterceptor implements Serializable
     {
         // validate usage
         final Class<?> returnType = ic.getMethod().getReturnType();
-        if (!COMPLETION_STAGE.isAssignableFrom(returnType) && !Future.class.isAssignableFrom(returnType))
+        if (!Future.class.isAssignableFrom(returnType) &&
+                (COMPLETION_STAGE == null || !COMPLETION_STAGE.isAssignableFrom(returnType)))
         {
             throw new IllegalArgumentException("Return type should be a CompletableStage
or Future");
         }


Mime
View raw message