From 00c38a0912cf48a3fa36a559c08471776bb165f7 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Fri, 27 Jan 2023 11:49:48 +0200 Subject: [PATCH] Fix opening in IDE when more than IDE is running Fixes: #23002 --- .../main/java/io/quarkus/deployment/ide/IdeProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/ide/IdeProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/ide/IdeProcessor.java index 56903f4840665..b9d9b9f035d59 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/ide/IdeProcessor.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/ide/IdeProcessor.java @@ -102,10 +102,10 @@ public EffectiveIdeBuildItem effectiveIde(LaunchModeBuildItem launchModeBuildIte } } } - if (matches.size() == 1) { - result = matches.get(0); - } else if (matches.size() == 0 && runningIdes.size() > 0) { + if ((matches.size() == 0 && runningIdes.size() > 0)) { result = runningIdes.iterator().next(); + } else if (matches.size() >= 1) { + result = matches.get(0); } } }