Skip to content

Commit

Permalink
Netty requires more classes to be runtime initialized
Browse files Browse the repository at this point in the history
In quarkusio#37347 we moved
`PlatformDependent` and `PlatformDependent0` classes to
run-time-initialization as they are platform-dependent and thus need to
be initialized on the target platform. It looks like there are more
classes like these that need to be runtime initialized as they
transitively rely on platform dependent values.

Closes Karm/mandrel-integration-tests#236

Supersedes quarkusio#37628
  • Loading branch information
zakkak committed Dec 8, 2023
1 parent af6d3d7 commit 3d01c78
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ NativeImageConfigBuildItem build(
log.debug("Not registering Netty native kqueue classes as they were not found");
}

builder.addRuntimeReinitializedClass("io.netty.util.internal.PlatformDependent");
builder.addRuntimeReinitializedClass("io.netty.util.internal.PlatformDependent0");
builder.addRuntimeReinitializedClass("io.netty.util.internal.PlatformDependent")
.addRuntimeReinitializedClass("io.netty.util.internal.PlatformDependent0")
.addRuntimeReinitializedClass("io.netty.buffer.PooledByteBufAllocator")
.addRuntimeReinitializedClass("io.netty.buffer.UnpooledByteBufAllocator")
.addRuntimeReinitializedClass("io.netty.buffer.Unpooled")
.addRuntimeReinitializedClass("io.vertx.core.http.impl.Http1xServerResponse")
.addRuntimeReinitializedClass("io.netty.handler.codec.http.HttpObjectAggregator");

return builder //TODO: make configurable
.build();
Expand Down

0 comments on commit 3d01c78

Please sign in to comment.