On Saturday 11 April 2009 04:54:30 j16sdiz at freenetproject.org 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 { -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 835 bytes Desc: This is a digitally signed message part. URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20090411/232e10f4/attachment.pgp>