snehashisp commented on code in PR #16984:
URL: https://github.com/apache/kafka/pull/16984#discussion_r1870897487
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/Plugins.java:
##########
@@ -240,6 +261,21 @@ public Runnable withClassLoader(ClassLoader classLoader,
Runnable operation) {
};
}
+ public static LoaderSwap swapLoader(ClassLoader loader) {
Review Comment:
I made this static so that I can directly invoke it from the runtime classes
while swapping loaders for converters, transformations. Making this non-static
is an option but we should then move this logic to the runtime (or pass the
plugins instance to the WorkerTasks which seems overkill). I will lead to a
small code duplication but will aid in mocking and testing there.
--
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]