diff options
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java b/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java index 9fb0dd8a7af..99847e02ef8 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java @@ -21,7 +21,6 @@ package org.sonar.server.plugins; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; -import org.slf4j.LoggerFactory; import org.sonar.api.Extension; import org.sonar.api.ExtensionProvider; import org.sonar.api.Plugin; @@ -80,11 +79,10 @@ public class ServerExtensionInstaller { Object installExtension(ComponentContainer container, PluginMetadata pluginMetadata, Object extension, boolean acceptProvider) { if (isType(extension, ServerExtension.class)) { if (!acceptProvider && isExtensionProvider(extension)) { - LoggerFactory.getLogger(getClass()).error("ExtensionProvider can not include providers itself: " + extension); - } else { - container.addExtension(pluginMetadata, extension); - return extension; + throw new IllegalStateException("ExtensionProvider can not include providers itself: " + extension); } + container.addExtension(pluginMetadata, extension); + return extension; } return null; } |