JarPluginProvider: Add JarScanner on running plugin JAR file
The JarScanner is being added on the source JAR file. This causes the file to be held open, which prevents the file from being renamed when the plugin is disabled when running Gerrit on Windows. Add the JarScanner on the copied JAR file from which the plugin is actually being run instead. Bug: Issue 3310 Change-Id: I14abda9bcaaf002e74e728a53f3efd60186df096
This commit is contained in:
@@ -142,7 +142,7 @@ public class JarPluginProvider implements ServerPluginProvider {
|
||||
new URLClassLoader(urls.toArray(new URL[urls.size()]),
|
||||
PluginLoader.parentFor(type));
|
||||
|
||||
JarScanner jarScanner = createJarScanner(srcJar);
|
||||
JarScanner jarScanner = createJarScanner(tmp);
|
||||
ServerPlugin plugin =
|
||||
new ServerPlugin(name, description.canonicalUrl, description.user,
|
||||
srcJar, snapshot, jarScanner, description.dataDir,
|
||||
|
||||
Reference in New Issue
Block a user