From b7fcb4dd974df546cc13faa6be6529ca6bc26688 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Fri, 1 Jul 2016 15:58:28 +0200 Subject: [PATCH] Provide plugin key when failing to load an extension --- it/it-tests/src/test/java/it/plugins/PluginsTest.java | 2 -- .../main/java/org/sonar/core/platform/ComponentContainer.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/it/it-tests/src/test/java/it/plugins/PluginsTest.java b/it/it-tests/src/test/java/it/plugins/PluginsTest.java index 8b643fb83a6..2ccbf546108 100644 --- a/it/it-tests/src/test/java/it/plugins/PluginsTest.java +++ b/it/it-tests/src/test/java/it/plugins/PluginsTest.java @@ -68,8 +68,6 @@ public class PluginsTest { "lits", "citymodel", - // status 1.0 is built for Java 8 so it is temporarily disabled - "status", // temporary incompatibility with cobol 3.1 // https://jira.sonarsource.com/browse/MAIF-213 "maifcobolplugin"); diff --git a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java index 9e4be739883..c82d857b858 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java @@ -245,7 +245,7 @@ public class ComponentContainer implements ContainerPopulator.Container { try { pico.as(Characteristics.CACHE).addComponent(key, extension); } catch (Throwable t) { - throw new IllegalStateException("Unable to register extension " + getName(extension), t); + throw new IllegalStateException("Unable to register extension " + getName(extension) + (pluginInfo != null ? (" from plugin '" + pluginInfo.getKey() + "'") : ""), t); } declareExtension(pluginInfo, extension); return this; -- 2.39.5