Skip to content

Commit

Permalink
Fix native compilation for Netty and Mutiny
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed Apr 2, 2024
1 parent 9ca43be commit b90033b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.mutiny.deployment;

import java.util.List;
import java.util.Optional;

import org.jboss.threads.ContextHandler;
Expand All @@ -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 {
Expand All @@ -33,12 +31,4 @@ public void buildTimeInit(MutinyInfrastructure recorder) {
recorder.configureThreadBlockingChecker();
recorder.configureOperatorLogger();
}

@BuildStep
public List<UnsafeAccessedFieldBuildItem> jctoolsUnsafeAccessedFields() {
return List.of(
new UnsafeAccessedFieldBuildItem(
"org.jctools.util.UnsafeRefArrayAccess",
"REF_ELEMENT_SHIFT"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b90033b

Please sign in to comment.