You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by ta...@apache.org on 2019/03/25 10:18:56 UTC

[deltaspike] branch master updated: List 'void' as valid Futureable return

This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/deltaspike.git


The following commit(s) were added to refs/heads/master by this push:
     new cf21e47  List 'void' as valid Futureable return
     new 1cf4368  Merge pull request #76 from seanf/futureable-void
cf21e47 is described below

commit cf21e47c1204ec1517b4ffa88dbe254843d20dc9
Author: Sean Flanigan <sf...@redhat.com>
AuthorDate: Thu Aug 30 17:52:04 2018 +1000

    List 'void' as valid Futureable return
---
 .../src/main/java/org/apache/deltaspike/core/api/future/Futureable.java | 2 +-
 .../apache/deltaspike/core/impl/future/DefaultFutureableStrategy.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/future/Futureable.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/future/Futureable.java
index 2a725c2..118b588 100644
--- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/future/Futureable.java
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/future/Futureable.java
@@ -29,7 +29,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
  * Mark the method as execute in a thread pool and not synchronously.
- * Note: it should return a CompletionStage or Future.
+ * Note: it should return a CompletionStage, Future or void.
  */
 @InterceptorBinding
 @Retention(RUNTIME)
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/DefaultFutureableStrategy.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/DefaultFutureableStrategy.java
index facecdc..3b652a1 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/DefaultFutureableStrategy.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/future/DefaultFutureableStrategy.java
@@ -141,7 +141,7 @@ public class DefaultFutureableStrategy implements FutureableStrategy
                 !void.class.isAssignableFrom(returnType) &&
                 (COMPLETION_STAGE == null || !COMPLETION_STAGE.isAssignableFrom(returnType)))
         {
-            throw new IllegalArgumentException("Return type should be a CompletableStage, Future or Void");
+            throw new IllegalArgumentException("Return type should be a CompletableStage, Future or void");
         }
 
         if (configByMethod == null)