On Saturday 11 April 2009 04:54:30 [email protected] wrote:
> Author: j16sdiz
> Date: 2009-04-11 03:54:29 +0000 (Sat, 11 Apr 2009)
> New Revision: 26732
> 
> Modified:
>    trunk/freenet/src/freenet/pluginmanager/PluginManager.java
> Log:
> Synchronized the plugin loading code

Why? What is the point?

And it probably isn't safe. We do quite a lot in loadPlugin, including calling 
methods on the plugin in the case that we have to load and unload. Also 
(this) is used when writing the config.
> 
> Modified: trunk/freenet/src/freenet/pluginmanager/PluginManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/pluginmanager/PluginManager.java        
> 2009-04-10 
23:16:41 UTC (rev 26731)
> +++ trunk/freenet/src/freenet/pluginmanager/PluginManager.java        
> 2009-04-11 
03:54:29 UTC (rev 26732)
> @@ -822,6 +822,8 @@
>                               }
>               }
>               
> +             // synchronized(this), not (pluginwrappers)
> +             synchronized (this) {
>               if(this.isPluginLoaded(filename)) {
>                       Logger.error(this, "Plugin already loaded: "+filename);
>                       return null;
> @@ -958,6 +960,7 @@
>                       pluginFile.delete();
>                       throw new PluginNotFoundException("unexcpected error 
> while plugin 
loading " + t, t);
>               }
> +             }
>       }
>  
>       private String getFileSHA1(File file) throws PluginNotFoundException {

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to