From c4ffaeb8c2e1d9e3f26ba0fd1787f1394d8ffc6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Wed, 18 Oct 2023 11:39:16 +0200 Subject: [PATCH] Always reset the ForkJoinPool TCCL on startup --- .../java/io/quarkus/runner/bootstrap/StartupActionImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkus/runner/bootstrap/StartupActionImpl.java b/core/deployment/src/main/java/io/quarkus/runner/bootstrap/StartupActionImpl.java index b67e9d4b1852fd..fc195c8eee40af 100644 --- a/core/deployment/src/main/java/io/quarkus/runner/bootstrap/StartupActionImpl.java +++ b/core/deployment/src/main/java/io/quarkus/runner/bootstrap/StartupActionImpl.java @@ -186,6 +186,9 @@ private void doClose() { @Override public int runMainClassBlocking(String... args) throws Exception { + //first we hack around class loading in the fork join pool + ForkJoinClassLoading.setForkJoinClassLoader(runtimeClassLoader); + //we have our class loaders ClassLoader old = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(runtimeClassLoader); @@ -252,7 +255,7 @@ public void overrideConfig(Map config) { * Runs the application, and returns a handle that can be used to shut it down. */ public RunningQuarkusApplication run(String... args) throws Exception { - //first + //first we hack around class loading in the fork join pool ForkJoinClassLoading.setForkJoinClassLoader(runtimeClassLoader); //we have our class loaders