提交 de0cd39f 编写于 作者: M mindless

[FIXED HUDSON-6966] in getIndexPage(), check that result has this plugin's artifactId

in it, in case plugin has dependencies but is missing its own index.jelly.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33311 71c3de6d-444a-0410-be80-ed276b4c234a
上级 003b78e0
......@@ -174,7 +174,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
* @param dependencies a list of mandatory dependencies
* @param optionalDependencies a list of optional dependencies
*/
public PluginWrapper(PluginManager parent, File archive, Manifest manifest, URL baseResourceURL,
public PluginWrapper(PluginManager parent, File archive, Manifest manifest, URL baseResourceURL,
ClassLoader classLoader, File disableFile,
List<Dependency> dependencies, List<Dependency> optionalDependencies) {
this.parent = parent;
......@@ -187,7 +187,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
this.active = !disableFile.exists();
this.dependencies = dependencies;
this.optionalDependencies = optionalDependencies;
}
}
/**
* Returns the URL of the index page jelly script.
......@@ -201,7 +201,9 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
while (en.hasMoreElements())
idx = en.nextElement();
} catch (IOException ignore) { }
return idx;
// In case plugin has dependencies but is missing its own index.jelly,
// check that result has this plugin's artifactId in it:
return idx != null && idx.toString().contains(shortName) ? idx : null;
}
private String computeShortName(Manifest manifest, File archive) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册