chia7712 commented on code in PR #20222: URL: https://github.com/apache/kafka/pull/20222#discussion_r2243317510
########## tools/src/main/java/org/apache/kafka/tools/ConnectPluginPath.java: ########## @@ -323,8 +322,7 @@ private static Set<Row> enumerateRows(ManifestWorkspace.SourceWorkspace<?> works rowAliases.add(PluginUtils.prunedName(pluginDesc)); rows.add(newRow(workspace, pluginDesc.className(), new ArrayList<>(rowAliases), pluginDesc.type(), pluginDesc.version(), true)); // If a corresponding manifest exists, mark it as loadable by removing it from the map. - // TODO: The use of Collections here shall be fixed with KAFKA-19524. - nonLoadableManifests.getOrDefault(pluginDesc.className(), Collections.emptySet()).remove(pluginDesc.type()); + nonLoadableManifests.getOrDefault(pluginDesc.className(), new HashSet<>()).remove(pluginDesc.type()); Review Comment: Perhaps we could avoid creating useless hash set. for example: ```java var types = nonLoadableManifests.get(pluginDesc.className()); if (types != null) types.remove(pluginDesc.type()); ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org