]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5601 - Updated ServerComponent CTor with types for Properties and Platform
authorStephane Gamard <stephane.gamard@sonarsource.com>
Mon, 8 Sep 2014 08:42:28 +0000 (10:42 +0200)
committerStephane Gamard <stephane.gamard@sonarsource.com>
Mon, 8 Sep 2014 08:42:55 +0000 (10:42 +0200)
server/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java

index fb5aafdde4817a91dffa7f5fa8c738cffe61a09a..dc1ce4f53b9c8ea504aa78253ca48279cdebdc52 100644 (file)
@@ -67,7 +67,7 @@ public class Platform {
   }
 
   public void init(Properties properties) {
-    serverComponents = new ServerComponents(properties, this);
+    serverComponents = new ServerComponents(this, properties);
     if (!dbConnected) {
       startLevel1Container();
       startLevel2Container();
index 3a3049e03f045e758691c6203dc7954873d3f404..63ebb72d92f013c3e3f98f679f507bf0b7f091b9 100644 (file)
@@ -302,13 +302,15 @@ import java.util.Properties;
 class ServerComponents {
 
   private final Object[] rootComponents;
+  private final Platform platform;
   private final Properties properties;
   private List level4AddedComponents = Lists.newArrayList();
 
-  ServerComponents(Properties properties, Object... rootComponents) {
+  ServerComponents(Platform platform, Properties properties, Object... rootComponents) {
     this.properties = properties;
-    this.rootComponents = Lists.newArrayList(properties, rootComponents)
-      .toArray(new Object[rootComponents.length + 1]);
+    this.platform = platform;
+    this.rootComponents = Lists.newArrayList(properties, platform, rootComponents)
+      .toArray(new Object[rootComponents.length + 2]);
   }
 
   /**