From a23633aba9a6609cadbe2d452032aadf07fcaa12 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Wed, 8 Jan 2025 16:50:13 +0200 Subject: [PATCH] Reinitialize `sun.nio.ch.NioSocketImpl` Workaround till https://github.com/oracle/graal/pull/10431 gets merged and backported to all supported versions --- .../quarkus/deployment/NioSocketImplProcessor.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 core/deployment/src/main/java/io/quarkus/deployment/NioSocketImplProcessor.java diff --git a/core/deployment/src/main/java/io/quarkus/deployment/NioSocketImplProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/NioSocketImplProcessor.java new file mode 100644 index 0000000000000..9f8d7098bcf7b --- /dev/null +++ b/core/deployment/src/main/java/io/quarkus/deployment/NioSocketImplProcessor.java @@ -0,0 +1,14 @@ +package io.quarkus.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; + +public class NioSocketImplProcessor { + + // Workaround till https://github.com/oracle/graal/pull/10431 gets merged and backported to all supported versions + @BuildStep + RuntimeInitializedClassBuildItem reinitializeClass() { + return new RuntimeInitializedClassBuildItem("sun.nio.ch.NioSocketImpl"); + } + +}