diff --git a/core/src/main/java/hudson/ExtensionFinder.java b/core/src/main/java/hudson/ExtensionFinder.java
index a2af086..2320e54 100644
--- a/core/src/main/java/hudson/ExtensionFinder.java
+++ b/core/src/main/java/hudson/ExtensionFinder.java
@@ -63,6 +63,7 @@ import java.util.Collection;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.util.Iterator;
/**
* Discovers the implementations of an extension point.
@@ -299,6 +300,12 @@ public abstract class ExtensionFinder implements ExtensionPoint {
for (GuiceExtensionAnnotation<?> gea : extensionAnnotations.values()) {
Iterables.addAll(indices, Index.load(gea.annotationType, Object.class, classLoader));
}
+ Iterator<IndexItem<?,Object>> it = indices.iterator();
+ while (it.hasNext()) {
+ if (it.next().className().startsWith("org.jenkinsci.main.modules.sshd.")) {
+ it.remove();
+ }
+ }
return ImmutableList.copyOf(indices);
}
Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/hudson/ExtensionFinder.java
http://jenkins-ci.org/commit/jenkins/22d433deae5e8e056f83900cc6c9bcc5a3ba60d5
Log:
So far unsuccessful attempt to make Jenkins startup more robust against bugs like
JENKINS-25440.Even though SezpozModule.configure catches and ignores the faulty component, Guice still dies:
… hudson.ExtensionFinder$GuiceFinder <init>
SEVERE: Failed to create Guice container from all the plugins
com.google.inject.internal.guava.collect.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/jgit/storage/file/FileRepository
at …
at com.google.inject.Guice.createInjector(Guice.java:73)
at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:279)