From 9d19554c99fb1962bccb2b04630dabe51ebf25c0 Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Thu, 20 Apr 2017 20:26:47 +0300 Subject: [PATCH] Minor improvements --- .../java/ro/fortsoft/pf4j/DefaultPluginDescriptorFinder.java | 2 +- pf4j/src/main/java/ro/fortsoft/pf4j/DependencyResolver.java | 2 +- pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java | 3 ++- .../ro/fortsoft/pf4j/PropertiesPluginDescriptorFinder.java | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginDescriptorFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginDescriptorFinder.java index 8b7eb37..2696fcd 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginDescriptorFinder.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginDescriptorFinder.java @@ -51,7 +51,7 @@ public class DefaultPluginDescriptorFinder extends ManifestPluginDescriptorFinde Path manifestPath = pluginPath.resolve(Paths.get(classes,"/META-INF/MANIFEST.MF")); log.debug("Lookup plugin descriptor in '{}'", manifestPath); if (Files.notExists(manifestPath)) { - throw new PluginException("Cannot find '" + manifestPath + "' path"); + throw new PluginException("Cannot find '{}' path", manifestPath); } try (InputStream input = Files.newInputStream(manifestPath)) { diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DependencyResolver.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DependencyResolver.java index c26881c..d45f677 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DependencyResolver.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DependencyResolver.java @@ -71,7 +71,7 @@ public class DependencyResolver { List pluginsId = dependenciesGraph.reverseTopologicalSort(); if (pluginsId == null) { - throw new PluginException("Cyclic dependencies !!!" + dependenciesGraph.toString()); + throw new PluginException("Cyclic dependencies !!! {}", dependenciesGraph.toString()); } log.debug("Plugins order: {}", pluginsId); diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java index 2ed5b24..e7f7f58 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java @@ -178,5 +178,6 @@ public interface PluginManager { * Gets the path of the folder where plugins are installed * @return Path of plugins root */ - public Path getPluginsRoot(); + Path getPluginsRoot(); + } diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/PropertiesPluginDescriptorFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/PropertiesPluginDescriptorFinder.java index 8af4269..7484b4d 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/PropertiesPluginDescriptorFinder.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/PropertiesPluginDescriptorFinder.java @@ -59,7 +59,7 @@ public class PropertiesPluginDescriptorFinder implements PluginDescriptorFinder Path propertiesPath = pluginPath.resolve(Paths.get(propertiesFileName)); log.debug("Lookup plugin descriptor in '{}'", propertiesPath); if (Files.notExists(propertiesPath)) { - throw new PluginException("Cannot find '" + pluginPath + "' path"); + throw new PluginException("Cannot find '{}' path", pluginPath); } Properties properties = new Properties(); -- 2.39.5