From d66eacc6afc388dfd0267b2f0f851382c501af3a Mon Sep 17 00:00:00 2001 From: Otavio Rodolfo Piske Date: Thu, 21 Mar 2024 10:34:56 +0100 Subject: [PATCH] CAMEL-20583: fixed compilation problem on static initialization --- .../java21/org/apache/camel/util/concurrent/ThreadType.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/camel-util/src/main/java21/org/apache/camel/util/concurrent/ThreadType.java b/core/camel-util/src/main/java21/org/apache/camel/util/concurrent/ThreadType.java index 6acd445823d75..16a9401371d24 100644 --- a/core/camel-util/src/main/java21/org/apache/camel/util/concurrent/ThreadType.java +++ b/core/camel-util/src/main/java21/org/apache/camel/util/concurrent/ThreadType.java @@ -30,7 +30,11 @@ public enum ThreadType { private static final Logger LOG = LoggerFactory.getLogger(ThreadType.class); private static final ThreadType CURRENT = Boolean.getBoolean("camel.threads.virtual.enabled") ? VIRTUAL : PLATFORM; static { - CURRENT == VIRTUAL ? LOG.info("The type of thread detected is: {}", CURRENT) : LOG.debug("The type of thread detected is: {}", CURRENT); + if (CURRENT == VIRTUAL) { + LOG.info("The type of thread detected is: {}", CURRENT); + } else { + LOG.debug("The type of thread detected is: {}", CURRENT); + } } public static ThreadType current() { return CURRENT;