aboutsummaryrefslogtreecommitdiffstats
path: root/pf4j
diff options
context:
space:
mode:
Diffstat (limited to 'pf4j')
-rw-r--r--pf4j/src/main/java/org/pf4j/AbstractPluginManager.java10
-rw-r--r--pf4j/src/main/java/org/pf4j/BasePluginRepository.java4
-rw-r--r--pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java4
-rw-r--r--pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java4
-rw-r--r--pf4j/src/main/java/org/pf4j/PluginRepository.java4
-rw-r--r--pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java18
-rw-r--r--pf4j/src/test/java/org/pf4j/DevelopmentPluginRepositoryTest.java8
-rw-r--r--pf4j/src/test/java/org/pf4j/JarPluginRepositoryTest.java8
8 files changed, 30 insertions, 30 deletions
diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
index b6b4741..6039b51 100644
--- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
+++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
@@ -207,19 +207,19 @@ public abstract class AbstractPluginManager implements PluginManager {
return;
}
- // get all plugins paths from repository
- List<Path> pluginsPaths = pluginRepository.getPluginsPaths();
+ // get all plugin paths from repository
+ List<Path> pluginPaths = pluginRepository.getPluginPaths();
// check for no plugins
- if (pluginsPaths.isEmpty()) {
+ if (pluginPaths.isEmpty()) {
log.info("No plugins");
return;
}
- log.debug("Found {} possible plugins: {}", pluginsPaths.size(), pluginsPaths);
+ log.debug("Found {} possible plugins: {}", pluginPaths.size(), pluginPaths);
// load plugins from plugin paths
- for (Path pluginPath : pluginsPaths) {
+ for (Path pluginPath : pluginPaths) {
try {
loadPluginFromPath(pluginPath);
} catch (PluginException e) {
diff --git a/pf4j/src/main/java/org/pf4j/BasePluginRepository.java b/pf4j/src/main/java/org/pf4j/BasePluginRepository.java
index b083994..64c996b 100644
--- a/pf4j/src/main/java/org/pf4j/BasePluginRepository.java
+++ b/pf4j/src/main/java/org/pf4j/BasePluginRepository.java
@@ -57,7 +57,7 @@ public class BasePluginRepository implements PluginRepository {
/**
* Set a {@link File} {@link Comparator} used to sort the listed files from {@code pluginsRoot}.
- * This comparator is used in {@link #getPluginsPaths()} method.
+ * This comparator is used in {@link #getPluginPaths()} method.
* By default is used a file comparator that returns the last modified files first.
* If you don't want a file comparator, then call this method with {@code null}.
*/
@@ -66,7 +66,7 @@ public class BasePluginRepository implements PluginRepository {
}
@Override
- public List<Path> getPluginsPaths() {
+ public List<Path> getPluginPaths() {
File[] files = pluginsRoot.toFile().listFiles(filter);
if ((files == null) || files.length == 0) {
diff --git a/pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java b/pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java
index aef714c..600f00c 100644
--- a/pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java
+++ b/pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java
@@ -56,10 +56,10 @@ public class CompoundPluginRepository implements PluginRepository {
}
@Override
- public List<Path> getPluginsPaths() {
+ public List<Path> getPluginPaths() {
Set<Path> paths = new LinkedHashSet<>();
for (PluginRepository repository : repositories) {
- paths.addAll(repository.getPluginsPaths());
+ paths.addAll(repository.getPluginPaths());
}
return new ArrayList<>(paths);
diff --git a/pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java b/pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java
index f50a231..70a4bb9 100644
--- a/pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java
+++ b/pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java
@@ -48,9 +48,9 @@ public class DefaultPluginRepository extends BasePluginRepository {
}
@Override
- public List<Path> getPluginsPaths() {
+ public List<Path> getPluginPaths() {
extractZipFiles();
- return super.getPluginsPaths();
+ return super.getPluginPaths();
}
@Override
diff --git a/pf4j/src/main/java/org/pf4j/PluginRepository.java b/pf4j/src/main/java/org/pf4j/PluginRepository.java
index 941d68f..9b4298a 100644
--- a/pf4j/src/main/java/org/pf4j/PluginRepository.java
+++ b/pf4j/src/main/java/org/pf4j/PluginRepository.java
@@ -27,11 +27,11 @@ import java.util.List;
public interface PluginRepository {
/**
- * List all plugins paths.
+ * List all plugin paths.
*
* @return a list with paths
*/
- List<Path> getPluginsPaths();
+ List<Path> getPluginPaths();
/**
* Removes a plugin from the repository.
diff --git a/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java b/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java
index 2237dfe..3474aa6 100644
--- a/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java
+++ b/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java
@@ -49,18 +49,18 @@ public class DefaultPluginRepositoryTest {
}
/**
- * Test of {@link DefaultPluginRepository#getPluginsPaths()} method.
+ * Test of {@link DefaultPluginRepository#getPluginPaths()} method.
*/
@Test
public void testGetPluginArchives() {
PluginRepository repository = new DefaultPluginRepository(pluginsPath);
- List<Path> pluginsPaths = repository.getPluginsPaths();
+ List<Path> pluginPaths = repository.getPluginPaths();
- assertEquals(3, pluginsPaths.size());
- assertPathExists(pluginsPaths, pluginsPath.resolve("plugin-1"));
- assertPathExists(pluginsPaths, pluginsPath.resolve("plugin-2"));
- assertPathExists(pluginsPaths, pluginsPath.resolve("plugin-3"));
+ assertEquals(3, pluginPaths.size());
+ assertPathExists(pluginPaths, pluginsPath.resolve("plugin-1"));
+ assertPathExists(pluginPaths, pluginsPath.resolve("plugin-2"));
+ assertPathExists(pluginPaths, pluginsPath.resolve("plugin-3"));
}
/**
@@ -76,10 +76,10 @@ public class DefaultPluginRepositoryTest {
assertTrue(repository.deletePluginPath(pluginsPath.resolve("plugin-3")));
assertFalse(repository.deletePluginPath(pluginsPath.resolve("plugin-4")));
- List<Path> pluginsPaths = repository.getPluginsPaths();
+ List<Path> pluginPaths = repository.getPluginPaths();
- assertEquals(1, pluginsPaths.size());
- assertEquals(pluginsPath.relativize(pluginsPaths.get(0)).toString(), "plugin-2");
+ assertEquals(1, pluginPaths.size());
+ assertEquals(pluginsPath.relativize(pluginPaths.get(0)).toString(), "plugin-2");
}
private void assertPathExists(List<Path> paths, Path path) {
diff --git a/pf4j/src/test/java/org/pf4j/DevelopmentPluginRepositoryTest.java b/pf4j/src/test/java/org/pf4j/DevelopmentPluginRepositoryTest.java
index 9e4c8da..20d9129 100644
--- a/pf4j/src/test/java/org/pf4j/DevelopmentPluginRepositoryTest.java
+++ b/pf4j/src/test/java/org/pf4j/DevelopmentPluginRepositoryTest.java
@@ -46,12 +46,12 @@ public class DevelopmentPluginRepositoryTest {
public void testGetPluginArchivesInDevelopmentMode() {
PluginRepository repository = new DevelopmentPluginRepository(pluginsPath);
- List<Path> pluginsPaths = repository.getPluginsPaths();
+ List<Path> pluginPaths = repository.getPluginPaths();
// target and build should be ignored
- assertEquals(0, pluginsPaths.size());
- assertPathDoesNotExists(pluginsPaths, pluginsPath.resolve(DevelopmentPluginRepository.MAVEN_BUILD_DIR));
- assertPathDoesNotExists(pluginsPaths, pluginsPath.resolve(DevelopmentPluginRepository.GRADLE_BUILD_DIR));
+ assertEquals(0, pluginPaths.size());
+ assertPathDoesNotExists(pluginPaths, pluginsPath.resolve(DevelopmentPluginRepository.MAVEN_BUILD_DIR));
+ assertPathDoesNotExists(pluginPaths, pluginsPath.resolve(DevelopmentPluginRepository.GRADLE_BUILD_DIR));
}
private void assertPathDoesNotExists(List<Path> paths, Path path) {
diff --git a/pf4j/src/test/java/org/pf4j/JarPluginRepositoryTest.java b/pf4j/src/test/java/org/pf4j/JarPluginRepositoryTest.java
index 02d2bcc..4501223 100644
--- a/pf4j/src/test/java/org/pf4j/JarPluginRepositoryTest.java
+++ b/pf4j/src/test/java/org/pf4j/JarPluginRepositoryTest.java
@@ -46,13 +46,13 @@ public class JarPluginRepositoryTest {
assertFalse(repository.deletePluginPath(plugin1Path));
- List<Path> pluginsPaths = repository.getPluginsPaths();
- assertEquals(1, pluginsPaths.size());
+ List<Path> pluginPaths = repository.getPluginPaths();
+ assertEquals(1, pluginPaths.size());
assertTrue(repository.deletePluginPath(plugin1JarPath));
- pluginsPaths = repository.getPluginsPaths();
- assertEquals(0, pluginsPaths.size());
+ pluginPaths = repository.getPluginPaths();
+ assertEquals(0, pluginPaths.size());
}
}