From: Decebal Suiu Date: Wed, 27 Sep 2017 18:36:29 +0000 (+0300) Subject: Open a new extension (protected method) point in PropertiesPluginDescriptorFinder X-Git-Tag: release-2.0.0~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=da346cf715b98560120fd2b3c531199f3ff58d37;p=pf4j.git Open a new extension (protected method) point in PropertiesPluginDescriptorFinder --- diff --git a/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java b/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java index 0391bce..31d4d53 100644 --- a/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java +++ b/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java @@ -55,10 +55,10 @@ public class PropertiesPluginDescriptorFinder implements PluginDescriptorFinder } protected Properties readProperties(Path pluginPath) throws PluginException { - Path propertiesPath = pluginPath.resolve(Paths.get(propertiesFileName)); + Path propertiesPath = getPropertiesPath(pluginPath, propertiesFileName); log.debug("Lookup plugin descriptor in '{}'", propertiesPath); if (Files.notExists(propertiesPath)) { - throw new PluginException("Cannot find '{}' path", pluginPath); + throw new PluginException("Cannot find '{}' path", propertiesPath); } Properties properties = new Properties(); @@ -71,6 +71,10 @@ public class PropertiesPluginDescriptorFinder implements PluginDescriptorFinder return properties; } + protected Path getPropertiesPath(Path pluginPath, String propertiesFileName) throws PluginException { + return pluginPath.resolve(Paths.get(propertiesFileName)); + } + protected PluginDescriptor createPluginDescriptor(Properties properties) { PluginDescriptor pluginDescriptor = createPluginDescriptorInstance();