]> source.dussan.org Git - pf4j.git/commitdiff
Resolve #209
authorDecebal Suiu <decebal.suiu@gmail.com>
Sun, 25 Nov 2018 15:59:09 +0000 (17:59 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Sun, 25 Nov 2018 15:59:09 +0000 (17:59 +0200)
pf4j/src/main/java/org/pf4j/CompoundPluginDescriptorFinder.java

index 990b9c0e6a46a838c50e307a42e21dfd6e6aa352..751ad5e075404e9d0e1930ec9db3f41f66c1314c 100644 (file)
@@ -67,9 +67,14 @@ public class CompoundPluginDescriptorFinder implements PluginDescriptorFinder {
                         return pluginDescriptor;
                     }
                 } catch (Exception e) {
-                    // log the exception and continue with the next finder
-                    log.error(e.getMessage(), e);
-                    log.debug("Try to continue with the next finder");
+                    if (finders.indexOf(finder) == finders.size() - 1) {
+                        // it's the last finder
+                        log.error(e.getMessage(), e);
+                    } else {
+                        // log the exception and continue with the next finder
+                        log.debug(e.getMessage());
+                        log.debug("Try to continue with the next finder");
+                    }
                 }
             } else {
                 log.debug("'{}' is not applicable for plugin '{}'", finder, pluginPath);