From 18dd6ed58f672b210d7a9555106b53e22b348ff1 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 18 Jan 2024 15:16:06 +0100 Subject: [PATCH] feat(imp):[#214] fix PMD warning --- .../tractusx/irs/common/util/concurrent/ResultFinder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irs-common/src/main/java/org/eclipse/tractusx/irs/common/util/concurrent/ResultFinder.java b/irs-common/src/main/java/org/eclipse/tractusx/irs/common/util/concurrent/ResultFinder.java index 78089f6646..655494eb1b 100644 --- a/irs-common/src/main/java/org/eclipse/tractusx/irs/common/util/concurrent/ResultFinder.java +++ b/irs-common/src/main/java/org/eclipse/tractusx/irs/common/util/concurrent/ResultFinder.java @@ -76,11 +76,11 @@ public CompletableFuture getFastestResult(final List if (ex != null) { log.error("Exception occurred: " + ex.getMessage(), ex); fastestResultPromise.completeExceptionally(new CompletionExceptions(exceptions)); - } else if (!fastestResultPromise.isDone()) { + } else if (fastestResultPromise.isDone()) { + log.debug("Fastest result already found, ignoring the others"); + } else { log.debug("Completing"); fastestResultPromise.complete(null); - } else { - log.debug("Fastest result already found, ignoring the others"); } });