cushon commented on code in PR #38906:
URL: https://github.com/apache/beam/pull/38906#discussion_r3395688159
##########
sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoByteBuddyUtils.java:
##########
@@ -1190,4 +1209,12 @@ public ByteCodeAppender appender(final Target
implementationTarget) {
};
}
}
+
+ private static Class<?> getLoadingTarget(Class<?> protoClass) {
+ ClassLoader loader =
ReflectHelpers.findClassLoader(ProtoByteBuddyUtils.class, protoClass);
+ if (loader == ProtoByteBuddyUtils.class.getClassLoader()) {
+ return ProtoByteBuddyUtils.class;
+ }
+ return protoClass;
+ }
Review Comment:
I don't think this is true, `findClassLoader ` considers all of the provided
classes and uses `isParent` to find the parent classloader if the classes are
loaded by different classloaders
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]