divijvaidya commented on code in PR #12281:
URL: https://github.com/apache/kafka/pull/12281#discussion_r903755896
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/DelegatingClassLoader.java:
##########
@@ -222,14 +222,10 @@ protected PluginClassLoader newPluginClassLoader(
private <T> void addPlugins(Collection<PluginDesc<T>> plugins, ClassLoader
loader) {
for (PluginDesc<T> plugin : plugins) {
String pluginClassName = plugin.className();
- SortedMap<PluginDesc<?>, ClassLoader> inner =
pluginLoaders.get(pluginClassName);
- if (inner == null) {
- inner = new TreeMap<>();
- pluginLoaders.put(pluginClassName, inner);
- // TODO: once versioning is enabled this line should be moved
outside this if branch
+ pluginLoaders.computeIfAbsent(pluginClassName, k -> {
Review Comment:
ok, that is fair, I will revert this change from this PR.
--
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]