From b90033b1d7a80f03c4c3b32b2a473f07fbc2f598 Mon Sep 17 00:00:00 2001 From: Julien Ponge Date: Tue, 2 Apr 2024 12:39:32 +0200 Subject: [PATCH] Fix native compilation for Netty and Mutiny See #39819 and #39788 --- .../io/quarkus/mutiny/deployment/MutinyProcessor.java | 10 ---------- .../io/quarkus/netty/deployment/NettyProcessor.java | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/extensions/mutiny/deployment/src/main/java/io/quarkus/mutiny/deployment/MutinyProcessor.java b/extensions/mutiny/deployment/src/main/java/io/quarkus/mutiny/deployment/MutinyProcessor.java index b31d1958752534..0802ea01dc8617 100644 --- a/extensions/mutiny/deployment/src/main/java/io/quarkus/mutiny/deployment/MutinyProcessor.java +++ b/extensions/mutiny/deployment/src/main/java/io/quarkus/mutiny/deployment/MutinyProcessor.java @@ -1,6 +1,5 @@ package io.quarkus.mutiny.deployment; -import java.util.List; import java.util.Optional; import org.jboss.threads.ContextHandler; @@ -11,7 +10,6 @@ import io.quarkus.deployment.builditem.ContextHandlerBuildItem; import io.quarkus.deployment.builditem.ExecutorBuildItem; import io.quarkus.deployment.builditem.ShutdownContextBuildItem; -import io.quarkus.deployment.builditem.nativeimage.UnsafeAccessedFieldBuildItem; import io.quarkus.mutiny.runtime.MutinyInfrastructure; public class MutinyProcessor { @@ -33,12 +31,4 @@ public void buildTimeInit(MutinyInfrastructure recorder) { recorder.configureThreadBlockingChecker(); recorder.configureOperatorLogger(); } - - @BuildStep - public List jctoolsUnsafeAccessedFields() { - return List.of( - new UnsafeAccessedFieldBuildItem( - "org.jctools.util.UnsafeRefArrayAccess", - "REF_ELEMENT_SHIFT")); - } } diff --git a/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java b/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java index a7d5ae3e2c2a5a..4c2741d2092ede 100644 --- a/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java +++ b/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java @@ -105,6 +105,8 @@ NativeImageConfigBuildItem build( .addRuntimeInitializedClass("io.netty.handler.ssl.ReferenceCountedOpenSslEngine") .addRuntimeInitializedClass("io.netty.handler.ssl.ReferenceCountedOpenSslContext") .addRuntimeInitializedClass("io.netty.handler.ssl.ReferenceCountedOpenSslClientContext") + .addRuntimeInitializedClass("io.netty.handler.ssl.JdkSslServerContext") + .addRuntimeInitializedClass("io.netty.handler.ssl.JdkSslClientContext") .addRuntimeInitializedClass("io.netty.handler.ssl.util.ThreadLocalInsecureRandom") .addRuntimeInitializedClass("io.netty.buffer.ByteBufUtil$HexUtil") .addRuntimeInitializedClass("io.netty.buffer.PooledByteBufAllocator")