[FIXED JENKINS-8866] Look for Descriptor.getId()==null and warn the administrator

This commit is contained in:
Kohsuke Kawaguchi committed 2011-03-08 11:04:00 -08:00
1 parent 51770129bb
commit 229f536cba
7 files changed
+141 -2

No files matched your search

@@ -455,6 +455,20 @@ public abstract class PluginManager extends AbstractModelObject {
return result;
}
/**
* Return the {@link PluginWrapper} that loaded the given class 'c'.
*
* @since 1.402.
*/
public PluginWrapper whichPlugin(Class c) {
ClassLoader cl = c.getClassLoader();
for (PluginWrapper p : activePlugins) {
if (p.classLoader==cl)
return p;
}
return null;
}
/**
* Orderly terminates all the plugins.
*/