From: Sébastien Lesaint Date: Thu, 31 Mar 2016 13:51:31 +0000 (+0200) Subject: fix quality flaws X-Git-Tag: 5.5-M12~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0dd3ac65fe67516316d153a4ce950a74fd1aa0e0;p=sonarqube.git fix quality flaws --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/container/ReportComputeEngineContainerPopulator.java b/server/sonar-server/src/main/java/org/sonar/server/computation/container/ReportComputeEngineContainerPopulator.java index d348ee895c3..99a8e0a3078 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/container/ReportComputeEngineContainerPopulator.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/container/ReportComputeEngineContainerPopulator.java @@ -95,12 +95,14 @@ import org.sonar.server.computation.taskprocessor.MutableTaskResultHolderImpl; import org.sonar.server.view.index.ViewIndex; public final class ReportComputeEngineContainerPopulator implements ContainerPopulator { + private static final ReportAnalysisComponentProvider[] NO_REPORT_ANALYSIS_COMPONENT_PROVIDERS = new ReportAnalysisComponentProvider[0]; + private final CeTask task; private final ReportAnalysisComponentProvider[] componentProviders; public ReportComputeEngineContainerPopulator(CeTask task, @Nullable ReportAnalysisComponentProvider[] componentProviders) { this.task = task; - this.componentProviders = componentProviders == null ? new ReportAnalysisComponentProvider[0] : componentProviders; + this.componentProviders = componentProviders == null ? NO_REPORT_ANALYSIS_COMPONENT_PROVIDERS : componentProviders; } @Override diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueInitializer.java b/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueInitializer.java index 060479d4c12..594410f6c6a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueInitializer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueInitializer.java @@ -19,10 +19,9 @@ */ package org.sonar.server.computation.queue; +import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.platform.Server; import org.sonar.api.platform.ServerStartHandler; -import org.sonar.api.ce.ComputeEngineSide; -import org.sonar.ce.monitoring.CEQueueStatus; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.server.computation.taskprocessor.CeProcessingScheduler; diff --git a/server/sonar-server/src/main/java/org/sonar/server/user/ServerUserSession.java b/server/sonar-server/src/main/java/org/sonar/server/user/ServerUserSession.java index 982cad7e6d5..3fe9aaaca26 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/user/ServerUserSession.java +++ b/server/sonar-server/src/main/java/org/sonar/server/user/ServerUserSession.java @@ -34,8 +34,7 @@ import static com.google.common.collect.Sets.newHashSet; /** * Part of the current HTTP session */ -public class ServerUserSession extends AbstractUserSession - implements UserSession { +public class ServerUserSession extends AbstractUserSession { private Map projectKeyByComponentKey = newHashMap();