]> source.dussan.org Git - sonarqube.git/commitdiff
fix quality flaws 875/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 31 Mar 2016 13:51:31 +0000 (15:51 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 31 Mar 2016 13:51:31 +0000 (15:51 +0200)
server/sonar-server/src/main/java/org/sonar/server/computation/container/ReportComputeEngineContainerPopulator.java
server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueInitializer.java
server/sonar-server/src/main/java/org/sonar/server/user/ServerUserSession.java

index d348ee895c37bc3ad025bdbd8f31b1ea96626283..99a8e0a3078d07822b04469ac7137058194180a6 100644 (file)
@@ -95,12 +95,14 @@ import org.sonar.server.computation.taskprocessor.MutableTaskResultHolderImpl;
 import org.sonar.server.view.index.ViewIndex;
 
 public final class ReportComputeEngineContainerPopulator implements ContainerPopulator<ComputeEngineContainer> {
+  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
index 060479d4c1217c761b55723b5c52eb177eb98a16..594410f6c6ae860c148f484b8ada0cbf4850a921 100644 (file)
  */
 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;
index 982cad7e6d5d226b78c3d5cc76c2bda26964da4e..3fe9aaaca2626c629dc589b7ff640000660d4235 100644 (file)
@@ -34,8 +34,7 @@ import static com.google.common.collect.Sets.newHashSet;
 /**
  * Part of the current HTTP session
  */
-public class ServerUserSession extends AbstractUserSession<ServerUserSession>
-  implements UserSession {
+public class ServerUserSession extends AbstractUserSession<ServerUserSession> {
 
   private Map<String, String> projectKeyByComponentKey = newHashMap();