Skip to content

Commit 6f788c0

Browse files
committed
chore: Add PlatformDependent class to the runtime declaration
1 parent c069bcd commit 6f788c0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

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
@@ -10,6 +10,6 @@ Args=--add-opens=java.base/java.time=ALL-UNNAMED \
1010
io.grpc.netty.shaded.io.netty.channel.unix,\
1111
io.grpc.netty.shaded.io.netty.handler.ssl,\
1212
io.grpc.internal.RetriableStream,\
13-
io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueue, \
13+
io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent,\
1414
io.grpc.netty.shaded.io.netty
1515
--features=com.google.api.gax.grpc.nativeimage.GrpcNettyFeature

gax-java/gax/src/main/java/com/google/api/gax/nativeimage/NativeImageUtils.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,9 @@ public static void registerClassForReflection(FeatureAccess access, String name)
8888
Class<?> clazz = access.findClassByName(name);
8989
if (clazz != null) {
9090
RuntimeReflection.register(clazz);
91+
RuntimeReflection.register(clazz.getDeclaredConstructors());
9192
RuntimeReflection.register(clazz.getDeclaredFields());
9293
RuntimeReflection.register(clazz.getDeclaredMethods());
93-
94-
while (clazz != null) {
95-
RuntimeReflection.register(clazz.getDeclaredConstructors());
96-
clazz = clazz.getSuperclass();
97-
}
9894
} else {
9995
LOGGER.log(Level.WARNING, CLASS_REFLECTION_ERROR_MESSAGE, name);
10096
}

0 commit comments

Comments
 (0)