Skip to content

Commit b76820d

Browse files
committed
chore: Add the unpadded versions to be registered for unsafe access
1 parent 5ca594e commit b76820d

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@ private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) {
148148
access,
149149
NETTY_SHADED_PACKAGE + "org.jctools.queues.MpscArrayQueueConsumerIndexField",
150150
"consumerIndex");
151+
registerForUnsafeFieldAccess(
152+
access,
153+
NETTY_SHADED_PACKAGE + "org.jctools.queues.MpscUnpaddedArrayQueueProducerIndexField",
154+
"producerIndex");
155+
registerForUnsafeFieldAccess(
156+
access,
157+
NETTY_SHADED_PACKAGE + "org.jctools.queues.MpscUnpaddedArrayQueueProducerLimitField",
158+
"producerLimit");
159+
registerForUnsafeFieldAccess(
160+
access,
161+
NETTY_SHADED_PACKAGE + "org.jctools.queues.MpscUnpaddedArrayQueueConsumerIndexField",
162+
"consumerIndex");
151163
registerForUnsafeFieldAccess(
152164
access,
153165
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields",
Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
Args = --add-opens=java.base/java.time=ALL-UNNAMED
2-
Args = --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
3-
4-
Args = --initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl,\
5-
io.grpc.netty.shaded.io.netty.internal.tcnative.SSL,\
6-
io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier,\
7-
io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethod,\
8-
io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod,\
9-
io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCompressionAlgo,\
10-
io.grpc.netty.shaded.io.grpc.netty,\
11-
io.grpc.netty.shaded.io.netty.channel.epoll,\
12-
io.grpc.netty.shaded.io.netty.channel.unix,\
13-
io.grpc.netty.shaded.io.netty.handler.ssl,\
14-
io.grpc.internal.RetriableStream,\
15-
io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent,\
16-
io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueue,\
17-
io.grpc.netty.shaded.io.netty.buffer.PoolThreadCache,\
18-
io.grpc.netty.shaded.io.netty
19-
20-
Args = --features=com.google.api.gax.grpc.nativeimage.GrpcNettyFeature
1+
Args=--add-opens=java.base/java.time=ALL-UNNAMED \
2+
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl,\
3+
io.grpc.netty.shaded.io.netty.internal.tcnative.SSL,\
4+
io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier,\
5+
io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethod,\
6+
io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod,\
7+
io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCompressionAlgo,\
8+
io.grpc.netty.shaded.io.grpc.netty,\
9+
io.grpc.netty.shaded.io.netty.channel.epoll,\
10+
io.grpc.netty.shaded.io.netty.channel.unix,\
11+
io.grpc.netty.shaded.io.netty.handler.ssl,\
12+
io.grpc.internal.RetriableStream,\
13+
io.grpc.netty.shaded.io.netty \
14+
--features=com.google.api.gax.grpc.nativeimage.GrpcNettyFeature

0 commit comments

Comments
 (0)