|
|
@ -13,7 +13,6 @@ |
|
|
|
package ro.fortsoft.pf4j; |
|
|
|
package ro.fortsoft.pf4j; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
@ -107,11 +106,22 @@ public class PluginDescriptor { |
|
|
|
|
|
|
|
|
|
|
|
void setDependencies(String dependencies) { |
|
|
|
void setDependencies(String dependencies) { |
|
|
|
if (dependencies != null) { |
|
|
|
if (dependencies != null) { |
|
|
|
|
|
|
|
dependencies = dependencies.trim(); |
|
|
|
|
|
|
|
if (dependencies.isEmpty()) { |
|
|
|
|
|
|
|
this.dependencies = Collections.emptyList(); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dependencies = new ArrayList<PluginDependency>(); |
|
|
|
this.dependencies = new ArrayList<PluginDependency>(); |
|
|
|
List<String> tokens = Arrays.asList(dependencies.split(",")); |
|
|
|
String[] tokens = dependencies.split(","); |
|
|
|
for (String dependency : tokens) { |
|
|
|
for (String dependency : tokens) { |
|
|
|
|
|
|
|
dependency = dependency.trim(); |
|
|
|
|
|
|
|
if (!dependency.isEmpty()) { |
|
|
|
this.dependencies.add(new PluginDependency(dependency)); |
|
|
|
this.dependencies.add(new PluginDependency(dependency)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.dependencies.isEmpty()) { |
|
|
|
|
|
|
|
this.dependencies = Collections.emptyList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.dependencies = Collections.emptyList(); |
|
|
|
this.dependencies = Collections.emptyList(); |
|
|
|
} |
|
|
|
} |
|
|
|