From: Simon Brandhof Date: Wed, 31 Aug 2016 12:13:28 +0000 (+0200) Subject: SONAR-7678 DefaultHttpDownloader uses system settings X-Git-Tag: 6.1-RC1~210 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b4619b22bb4434524036911adeb5cf5eda0c7ebb;p=sonarqube.git SONAR-7678 DefaultHttpDownloader uses system settings 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. --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java index 0bc71db5cfa..9ba970debd0 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java @@ -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, diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel3.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel3.java index 2c82b30b561..d221eadc8e0 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel3.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel3.java @@ -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,