PluginLoader: Don't low case plugin name

Since Ibbb15ad2a plugin name was low cased. This broke some plugins that
unable to reconstruct the real plugin name from the combination of site_path
and plugin name:

  new File(site.plugins_dir, pluginName + ".jar").getAbsolutePath()

returns now erroneously:

  <site_path>/plugins/github-plugin-2.10-snapshot.jar

instead of

  <site_path>/plugins/github-plugin-2.10-SNAPSHOT.jar

Change-Id: I9690f2af727a676be768936f02d30cca219c1fa7
This commit is contained in:
David Ostrovsky
2014-05-17 22:38:20 +02:00
parent 7626bb107f
commit 9d485875ef

View File

@@ -78,7 +78,7 @@ public class PluginLoader implements LifecycleListener {
static final Logger log = LoggerFactory.getLogger(PluginLoader.class);
public static String getPluginName(File srcFile) throws IOException {
return Objects.firstNonNull(getGerritPluginName(srcFile), nameOf(srcFile)).toLowerCase();
return Objects.firstNonNull(getGerritPluginName(srcFile), nameOf(srcFile));
}
private final File pluginsDir;