Merge pull request #1242 from daniel-beck/JENKINS-20031

[FIXED JENKINS-20031] Useful error message when UC not found
This commit is contained in:
Oleg Nenashev committed 2014-06-01 01:27:58 -07:00
commit 19f4cbcce1
1 file changed
+3 -1
+3 -1
View File
@@ -732,7 +732,9 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
String pluginName = n.substring(0, index);
String siteName = n.substring(index + 1);
UpdateSite updateSite = Jenkins.getInstance().getUpdateCenter().getById(siteName);
if (siteName != null) {
if (updateSite == null) {
throw new Failure("No such update center: " + siteName);
} else {
UpdateSite.Plugin plugin = updateSite.getPlugin(pluginName);
if (plugin != null) {
if (p != null) {