]> source.dussan.org Git - pf4j.git/commitdiff
Formatting
authorDecebal Suiu <decebal.suiu@gmail.com>
Thu, 18 Jan 2018 18:12:35 +0000 (20:12 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Thu, 18 Jan 2018 18:12:35 +0000 (20:12 +0200)
demo/plugins/plugin1/pom.xml
demo/plugins/plugin2/pom.xml
demo/plugins/pom.xml
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java

index 8c2f8267a8a2f1070b2c932c800288c152fb24b6..9fa107c6eb49a1b7cf5eda809c86ddeaa4c6dfd7 100644 (file)
@@ -18,7 +18,7 @@
         <plugin.class>org.pf4j.demo.welcome.WelcomePlugin</plugin.class>
         <plugin.version>0.0.1</plugin.version>
         <plugin.provider>Decebal Suiu</plugin.provider>
-        <plugin.dependencies />
+        <plugin.dependencies/>
     </properties>
 
     <dependencies>
index fb2d223b53f1ee2f985e0a0682b196558a10c612..653f93787a3f24f083784548fbf723dd54c646e8 100644 (file)
@@ -18,7 +18,7 @@
         <plugin.class>org.pf4j.demo.hello.HelloPlugin</plugin.class>
         <plugin.version>0.0.1</plugin.version>
         <plugin.provider>Decebal Suiu</plugin.provider>
-        <plugin.dependencies />
+        <plugin.dependencies/>
     </properties>
 
 </project>
index 682ccfdd6cc09b188160a8820c7def11c7837da5..98162d7724891cd6311b9170d7c4a1818a4e8ef4 100644 (file)
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <java.version>1.7</java.version>
-        <plugin.id />
-        <plugin.class />
-        <plugin.version />
-        <plugin.provider />
-        <plugin.dependencies />
+
+        <!-- Override below properties in each plugin's pom.xml -->
+        <plugin.id/>
+        <plugin.class/>
+        <plugin.version/>
+        <plugin.provider/>
+        <plugin.dependencies/>
     </properties>
 
     <build>
index 711d764ac3d24fa4b9ddb36a010865fa925d106e..9f3471e9697abee3ee27988a60e73aa9cc17d7af 100644 (file)
@@ -525,27 +525,29 @@ public abstract class AbstractPluginManager implements PluginManager {
         return pluginClassLoaders.get(pluginId);
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public <T> List<Class<T>> getExtensionClasses(Class<T> type) {
         List<ExtensionWrapper<T>> extensionsWrapper = extensionFinder.find(type);
         List<Class<T>> extensionClasses = new ArrayList<>(extensionsWrapper.size());
         for (ExtensionWrapper<T> extensionWrapper : extensionsWrapper) {
-            @SuppressWarnings("unchecked")
-            Class<T> c = (Class<T>)extensionWrapper.getDescriptor().extensionClass;
+            Class<T> c = (Class<T>) extensionWrapper.getDescriptor().extensionClass;
             extensionClasses.add(c);
         }
+
         return extensionClasses;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public <T> List<Class<T>> getExtensionClasses(Class<T> type, String pluginId) {
         List<ExtensionWrapper<T>> extensionsWrapper = extensionFinder.find(type, pluginId);
         List<Class<T>> extensionClasses = new ArrayList<>(extensionsWrapper.size());
         for (ExtensionWrapper<T> extensionWrapper : extensionsWrapper) {
-            @SuppressWarnings("unchecked")
-            Class<T> c = (Class<T>)extensionWrapper.getDescriptor().extensionClass;
+            Class<T> c = (Class<T>) extensionWrapper.getDescriptor().extensionClass;
             extensionClasses.add(c);
         }
+
         return extensionClasses;
     }