Commit 9d7f619e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Delete plugin folders of jar files that no longer exist.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8772 b35dd754-fafc-0310-a699-88a17e54d16e
parent f9f9abaa
......@@ -524,10 +524,7 @@ public class PluginManager {
Log.debug("Unloading plugin " + pluginName);
Plugin plugin = plugins.get(pluginName);
if (plugin == null) {
return;
}
if (plugin != null) {
// Remove from dev mode if it exists.
pluginDevelopment.remove(plugin);
......@@ -563,6 +560,8 @@ public class PluginManager {
catch (Exception e) {
Log.error(e);
}
}
// Try to remove the folder where the plugin was exploded. If this works then
// the plugin was successfully removed. Otherwise, some objects created by the
// plugin are still in memory.
......@@ -584,7 +583,7 @@ public class PluginManager {
Log.error(e);
}
if (!dir.exists()) {
if (plugin != null && !dir.exists()) {
plugins.remove(pluginName);
pluginDirs.remove(plugin);
classloaders.remove(plugin);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment