Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-22080] Braindead logic in author of original fix... co…
…rrected by same author
  • Loading branch information
stephenc committed Mar 7, 2014
1 parent f9b0f34 commit 483181c
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 483181c

Please sign in to comment.