Skip to content
Permalink
Browse files

[FIXED JENKINS-25440] Recursively resolve @Inject’ed extensions, too,…

… looking for LinkageError’s.
  • Loading branch information...
jglick committed Feb 29, 2016
1 parent 679da79 commit 1a2d82275c078ca3f651d9924a53acd2b6210a93
Showing with 5 additions and 2 deletions.
  1. +5 −2 core/src/main/java/hudson/ExtensionFinder.java
@@ -282,7 +282,6 @@ protected void configure() {
LOGGER.log(Level.SEVERE, "Failed to create Guice container from all the plugins",e);
// failing to load all bindings are disastrous, so recover by creating minimum that works
// by just including the core
// TODO this recovery is pretty much useless; startup crashes anyway
container = Guice.createInjector(new SezpozModule(loadSezpozIndices(Jenkins.class.getClassLoader())));
}

@@ -479,7 +478,11 @@ private void resolve(Class c) {
m.invoke(ecl, c);
c.getConstructors();
c.getMethods();
c.getFields();
for (Field f : c.getFields()) {
if (f.getAnnotation(javax.inject.Inject.class) != null || f.getAnnotation(com.google.inject.Inject.class) != null) {
resolve(f.getType());
}
}
LOGGER.log(Level.FINER, "{0} looks OK", c);
while (c != Object.class) {
c.getGenericSuperclass();

0 comments on commit 1a2d822

Please sign in to comment.
You can’t perform that action at this time.