Skip to content

Commit 50b1690

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

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
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
@@ -172,6 +172,18 @@ private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) {
172172
access,
173173
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields",
174174
"consumerIndex");
175+
registerForUnsafeFieldAccess(
176+
access,
177+
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedUnpaddedArrayQueueProducerFields",
178+
"producerIndex");
179+
registerForUnsafeFieldAccess(
180+
access,
181+
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedUnpaddedArrayQueueColdProducerFields",
182+
"producerLimit");
183+
registerForUnsafeFieldAccess(
184+
access,
185+
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedUnpaddedArrayQueueConsumerFields",
186+
"consumerIndex");
175187
}
176188
}
177189

gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/native-image.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Args=--add-opens=java.base/java.time=ALL-UNNAMED \
1111
io.grpc.netty.shaded.io.netty.handler.ssl,\
1212
io.grpc.internal.RetriableStream,\
1313
io.grpc.netty.shaded.io.netty \
14-
--features=com.google.api.gax.grpc.nativeimage.GrpcNettyFeature
14+
--features=com.google.api.gax.grpc.nativeimage.GrpcNettyFeature

0 commit comments

Comments
 (0)