[freenet-cvs] r15042 - trunk/freenet/src/freenet/pluginmanager

toad at freenetproject.org toad at freenetproject.org
Sat Sep 8 15:25:41 UTC 2007


Author: toad
Date: 2007-09-08 15:25:41 +0000 (Sat, 08 Sep 2007)
New Revision: 15042

Modified:
   trunk/freenet/src/freenet/pluginmanager/PluginManager.java
Log:
Regression fix: store the config, don't try to remove the toadlet if we have already done so

Modified: trunk/freenet/src/freenet/pluginmanager/PluginManager.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/PluginManager.java	2007-09-08 15:24:41 UTC (rev 15041)
+++ trunk/freenet/src/freenet/pluginmanager/PluginManager.java	2007-09-08 15:25:41 UTC (rev 15042)
@@ -173,9 +173,8 @@
 	 * @param t
 	 */
 	public void removePlugin(PluginInfoWrapper pi) {
-		PluginInfoWrapper removed = null;
 		synchronized (pluginWrappers) {
-			pluginWrappers.remove(pi);
+			if(!pluginWrappers.remove(pi)) return;
 		}
 		synchronized (toadletList) {
 			try {
@@ -186,8 +185,7 @@
 				Logger.error(this, "removing Plugin", ex);
 			}
 		}
-		if(removed != null)
-			core.storeConfig();
+		core.storeConfig();
 	}
 
 	public void addToadletSymlinks(PluginInfoWrapper pi) {




More information about the cvs mailing list