Skip to content

Commit e99a52d

Browse files
committed
chore: Register all super class constructors
1 parent cf8d479 commit e99a52d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) {
106106
access, "io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$GrpcNegotiationHandler");
107107
registerClassForReflection(
108108
access, "io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask");
109-
registerConstructorsForReflection(
109+
registerClassForReflection(
110110
access,
111111
"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueue");
112112

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,13 @@ 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());
9291
RuntimeReflection.register(clazz.getDeclaredFields());
9392
RuntimeReflection.register(clazz.getDeclaredMethods());
93+
94+
while (clazz != null) {
95+
RuntimeReflection.register(clazz.getDeclaredConstructors());
96+
clazz = clazz.getSuperclass();
97+
}
9498
} else {
9599
LOGGER.log(Level.WARNING, CLASS_REFLECTION_ERROR_MESSAGE, name);
96100
}

0 commit comments

Comments
 (0)