machi1990 commented on code in PR #13733:
URL: https://github.com/apache/kafka/pull/13733#discussion_r1198923768


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java:
##########
@@ -142,8 +142,12 @@ public class PluginUtils {
             + "|common\\.config\\.provider\\.(?!ConfigProvider$).*"
             + ")$");
 
-    private static final DirectoryStream.Filter<Path> PLUGIN_PATH_FILTER = 
path ->
-        Files.isDirectory(path) || isArchive(path) || isClassFile(path);
+    private static final DirectoryStream.Filter<Path> PLUGIN_PATH_FILTER = 
path -> {
+      if (!Files.isReadable(path)) {
+        log.warn("Non readable plugin path found, skipping: '{}'", path);
+      }
+      return Files.isReadable(path) && (Files.isDirectory(path) || 
isArchive(path) || isClassFile(path));

Review Comment:
   ```suggestion
         boolean isReadable = Files.isReadable(path);
         if (!isReadable) {
           log.warn("Non readable plugin path found, skipping: '{}'", path);
         }
         return isReadable && (Files.isDirectory(path) || isArchive(path) || 
isClassFile(path));
   ```



-- 
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

Reply via email to