Skip to content
Snippets Groups Projects
Commit e7fa8f7e authored by felmer's avatar felmer
Browse files

bug fixed: A disabled plugin which appeared twice caused an exception. This is now fixed

SVN: 24734
parent f38727f4
No related branches found
No related tags found
No related merge requests found
...@@ -247,12 +247,12 @@ public class CorePluginsInjector ...@@ -247,12 +247,12 @@ public class CorePluginsInjector
for (File pluginFolder : pluginFolders) for (File pluginFolder : pluginFolders)
{ {
String pluginName = pluginFolder.getName(); String pluginName = pluginFolder.getName();
assertAndAddPluginName(pluginName, pluginNames, pluginType);
DssCorePlugin plugin = DssCorePlugin plugin =
new DssCorePlugin(technology, pluginType, pluginFolder); new DssCorePlugin(technology, pluginType, pluginFolder);
String fullPluginName = plugin.getName(); String fullPluginName = plugin.getName();
if (isDisabled(disabledPlugins, fullPluginName) == false) if (isDisabled(disabledPlugins, fullPluginName) == false)
{ {
assertAndAddPluginName(pluginName, pluginNames, pluginType);
Map<String, DssCorePlugin> map = typeToPluginsMap.get(pluginType); Map<String, DssCorePlugin> map = typeToPluginsMap.get(pluginType);
if (map == null) if (map == null)
{ {
......
...@@ -249,6 +249,23 @@ public class CorePluginsInjectorTest extends AbstractFileSystemTestCase ...@@ -249,6 +249,23 @@ public class CorePluginsInjectorTest extends AbstractFileSystemTestCase
context.assertIsSatisfied(); context.assertIsSatisfied();
} }
@Test
public void testADuplicatedButDisabledReportingPluginVersion2()
{
new File(corePluginsFolder, "screening/1/dss/drop-boxes/my-drop-box").mkdirs();
File dropBox2 = new File(corePluginsFolder, "screening/2/dss/drop-boxes/k2");
dropBox2.mkdirs();
FileUtilities.writeToFile(new File(dropBox2, PLUGIN_PROPERTIES_FILE_NAME),
"class = blabla\n");
Properties properties = createProperties();
properties.setProperty(REPORTING_PLUGIN_NAMES, "k1, k2");
properties.setProperty(DISABLED_CORE_PLUGINS_KEY, "screening");
injector.injectCorePlugins(properties);
context.assertIsSatisfied();
}
@Test @Test
public void testAMiscellaneousPlugin() public void testAMiscellaneousPlugin()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment