@@ -38,7 +38,7 @@ public static URLClassLoader forPluginDir() {
3838 if (val .isBlank ()) {
3939 throw new IllegalArgumentException ("Plugin dir path is blank" );
4040 }
41- return forPluginDirWithPath (Path .of (val )); //Path.of might throw InvalidPathException
41+ return forPluginDirWithPath (Path .of (val )); //Path.of() might throw InvalidPathException
4242 } catch (IllegalArgumentException e ) {
4343 LOG .debug ("{} contains illegal value. Skipping plugin directory." , PLUGIN_DIR_KEY , e );
4444 return URLClassLoader .newInstance (new URL [0 ]);
@@ -49,7 +49,7 @@ public static URLClassLoader forPluginDir() {
4949 @ Contract (value = "_ -> new" , pure = true )
5050 static URLClassLoader forPluginDirWithPath (Path path ) throws UncheckedIOException {
5151 var jars = findJars (path );
52- if (LOG .isDebugEnabled ()) {
52+ if (LOG .isDebugEnabled () && jars . length != 0 ) {
5353 String jarList = Arrays .stream (jars ).map (URL ::getPath ).collect (Collectors .joining (", " ));
5454 LOG .debug ("Found jars in cryptomator.pluginDir: {}" , jarList );
5555 }
@@ -61,7 +61,7 @@ static URL[] findJars(Path path) {
6161 try (var stream = Files .walk (path )) {
6262 return stream .filter (ClassLoaderFactory ::isJarFile ).map (ClassLoaderFactory ::toUrl ).toArray (URL []::new );
6363 } catch (IOException | UncheckedIOException e ) {
64- // unable to locate any jars // TODO: log a warning?
64+ LOG . debug ( "Failed to read plugin dir {}" , path , e );
6565 return new URL [0 ];
6666 }
6767 }
0 commit comments