From 1d9715e94df7b77d5a8ba7460bbbf13c6eb16f70 Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Mon, 25 Mar 2024 15:58:25 +0100 Subject: [PATCH] fix how FaultTolerance.run() constructs the result in async mode --- .../faulttolerance/core/apiimpl/FaultToleranceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/implementation/core/src/main/java/io/smallrye/faulttolerance/core/apiimpl/FaultToleranceImpl.java b/implementation/core/src/main/java/io/smallrye/faulttolerance/core/apiimpl/FaultToleranceImpl.java index e145afac..7038d3ee 100644 --- a/implementation/core/src/main/java/io/smallrye/faulttolerance/core/apiimpl/FaultToleranceImpl.java +++ b/implementation/core/src/main/java/io/smallrye/faulttolerance/core/apiimpl/FaultToleranceImpl.java @@ -117,10 +117,9 @@ public T call(Callable action) throws Exception { @Override public void run(Runnable action) { try { - T unusedResult = asyncSupport == null ? null : asyncSupport.createComplete(null); call(() -> { action.run(); - return unusedResult; + return asyncSupport == null ? null : asyncSupport.createComplete(null); }); } catch (RuntimeException e) { throw e;