From b075de5f02b7a45a12bf11aef86d5332a8d74c7d Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 11 Dec 2009 17:12:57 +0000 Subject: [PATCH] added a probe for detecting Descriptor not found problem, which is most likely caused by getExtensionList that's too eagerly done. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24562 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/ExtensionList.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/hudson/ExtensionList.java b/core/src/main/java/hudson/ExtensionList.java index ab4bb33db9..cf2f944f2c 100644 --- a/core/src/main/java/hudson/ExtensionList.java +++ b/core/src/main/java/hudson/ExtensionList.java @@ -37,6 +37,8 @@ import java.util.List; import java.util.Vector; import java.util.Comparator; import java.util.concurrent.CopyOnWriteArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Retains the known extension instances for the given type 'T'. @@ -187,6 +189,9 @@ public class ExtensionList extends AbstractList { * Loads all the extensions. */ protected List load() { + if (LOGGER.isLoggable(Level.FINE)) + LOGGER.log(Level.FINE,"Loading ExtensionList: "+extensionType, new Throwable()); + List r = new ArrayList(); for (ExtensionFinder finder : finders()) r.addAll(finder.findExtensions(extensionType, hudson)); @@ -252,4 +257,6 @@ public class ExtensionList extends AbstractList { public static void clearLegacyInstances() { staticLegacyInstances.clear(); } + + private static final Logger LOGGER = Logger.getLogger(ExtensionList.class.getName()); }