Skip to content

Commit

Permalink
[FIXED JENKINS-22080] Braindead logic in author of original fix... co…
Browse files Browse the repository at this point in the history
…rrected by same author

(cherry picked from commit 483181c)
  • Loading branch information
stephenc authored and olivergondza committed Apr 13, 2014
1 parent 94fd597 commit 18e5415
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 18e5415

Please sign in to comment.