Skip to content

Commit

Permalink
Merge pull request #1151 from stephenc/master
Browse files Browse the repository at this point in the history
[FIXED JENKINS-22080] Braindead logic in author of original fix... corre...
  • Loading branch information
stephenc committed Mar 7, 2014
2 parents 067acbf + 483181c commit 5a6cf8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/src/main/java/hudson/PluginManager.java
Expand Up @@ -695,10 +695,13 @@ public void doInstall(StaplerRequest req, StaplerResponse rsp) throws IOExceptio
String siteName = n.substring(index + 1);
UpdateSite updateSite = Jenkins.getInstance().getUpdateCenter().getById(siteName);
if (siteName != null) {
if (p != null) {
throw new Failure("Ambiguous plugin: " + n);
UpdateSite.Plugin plugin = updateSite.getPlugin(pluginName);
if (plugin != null) {
if (p != null) {
throw new Failure("Ambiguous plugin: " + n);
}
p = plugin;
}
p = updateSite.getPlugin(pluginName);
}
index = n.indexOf('.', index + 1);
}
Expand Down

0 comments on commit 5a6cf8e

Please sign in to comment.