Skip to content

Commit

Permalink
[FIXED JENKINS-25440] Recursively resolve @Inject’ed extensions, too,…
Browse files Browse the repository at this point in the history
… looking for LinkageError’s.
  • Loading branch information
jglick committed Feb 29, 2016
1 parent 679da79 commit 1a2d822
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/main/java/hudson/ExtensionFinder.java
Expand Up @@ -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())));
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1a2d822

Please sign in to comment.