[FIXED JENKINS-20031] Useful error message when UC not found

This commit is contained in:
Daniel Beck committed 2014-05-19 22:27:39 +02:00
1 parent 016f304c49
commit a4b63d2dc0
1 file changed
+3 -1
+3 -1
View File
@@ -721,7 +721,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) {