majialoong commented on code in PR #20612:
URL: https://github.com/apache/kafka/pull/20612#discussion_r2394760752
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java:
##########
@@ -209,7 +209,7 @@ public static Set<Path> pluginLocations(String pluginPath,
boolean failFast) {
for (String path : pluginPathElements) {
try {
Path pluginPathElement = Paths.get(path).toAbsolutePath();
- if (pluginPath.isEmpty()) {
+ if (path.isEmpty()) {
Review Comment:
First, [in this PR](https://github.com/apache/kafka/pull/20334),
`plugin.path` is defined as a non-empty parameter, so this conditional
statement should never be executed.
Second, I think this conditional statement was ambiguous. The warning log
indicates that the plugin path element is empty, but the actual check is for
the entire plugin path, not just the element.
Therefore, we can either remove this conditional statement(since
`plugin.path` cannot be empty), or modify it to better match the warning log
message about an empty plugin path element. I prefer the latter approach.
--
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]