]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7678 DefaultHttpDownloader uses system settings
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 31 Aug 2016 12:13:28 +0000 (14:13 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 6 Sep 2016 08:13:55 +0000 (10:13 +0200)
On server side, no need to instantiate DefaultHttpDownloader
when db is up (level 3). It uses only system settings, so it
can be instantiated in level 1.

server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel3.java

index 0bc71db5cfaab8b03b35b8673147292e7e7ec024..9ba970debd0e4af8ea4b15bab7ebf8fc342ac2eb 100644 (file)
@@ -29,6 +29,7 @@ import org.sonar.api.utils.System2;
 import org.sonar.api.utils.Version;
 import org.sonar.api.utils.internal.TempFolderCleaner;
 import org.sonar.core.config.CorePropertyDefinitions;
+import org.sonar.core.util.DefaultHttpDownloader;
 import org.sonar.core.util.UuidFactoryImpl;
 import org.sonar.db.DaoModule;
 import org.sonar.db.DatabaseChecker;
@@ -81,6 +82,7 @@ public class PlatformLevel1 extends PlatformLevel {
       ProcessCommandWrapperImpl.class,
       RestartFlagHolderImpl.class,
       ServerSettingsImpl.class,
+      DefaultHttpDownloader.class,
       UuidFactoryImpl.INSTANCE,
       UrlSettings.class,
       EmbeddedDatabaseFactory.class,
index 2c82b30b5614fc7398ed86fbf822a5fb01033f8c..d221eadc8e00c649426c15cbcdb85ef0f04af09e 100644 (file)
@@ -20,7 +20,6 @@
 package org.sonar.server.platform.platformlevel;
 
 import org.sonar.api.utils.UriReader;
-import org.sonar.core.util.DefaultHttpDownloader;
 import org.sonar.server.platform.PersistentSettings;
 import org.sonar.server.platform.ServerIdGenerator;
 import org.sonar.server.platform.ServerIdLoader;
@@ -37,7 +36,6 @@ public class PlatformLevel3 extends PlatformLevel {
     addIfStartupLeader(StartupMetadataPersister.class);
     add(
       PersistentSettings.class,
-      DefaultHttpDownloader.class,
       UriReader.class,
       ServerIdLoader.class,
       ServerIdGenerator.class,