aboutsummaryrefslogtreecommitdiffstats
path: root/pf4j/src
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2017-09-27 21:36:29 +0300
committerDecebal Suiu <decebal.suiu@gmail.com>2017-09-27 21:36:29 +0300
commitda346cf715b98560120fd2b3c531199f3ff58d37 (patch)
treedd7e065decdcdfe981fb276d33b086032cfe9a89 /pf4j/src
parentbb7e2a7ce7c5d5f3e3c8267b57bf5068f2bbf1c3 (diff)
downloadpf4j-da346cf715b98560120fd2b3c531199f3ff58d37.tar.gz
pf4j-da346cf715b98560120fd2b3c531199f3ff58d37.zip
Open a new extension (protected method) point in PropertiesPluginDescriptorFinder
Diffstat (limited to 'pf4j/src')
-rw-r--r--pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java8
1 files changed, 6 insertions, 2 deletions
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();