]> source.dussan.org Git - pf4j.git/commitdiff
Open a new extension (protected method) point in PropertiesPluginDescriptorFinder
authorDecebal Suiu <decebal.suiu@gmail.com>
Wed, 27 Sep 2017 18:36:29 +0000 (21:36 +0300)
committerDecebal Suiu <decebal.suiu@gmail.com>
Wed, 27 Sep 2017 18:36:29 +0000 (21:36 +0300)
pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java

index 0391bcefaf9b21eff1ed65a0e029eff03a82fa80..31d4d5338f1e180a354c6037c699edc1570ba48a 100644 (file)
@@ -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();