From cc058a386950f69d40a6d422f2927c3f92857724 Mon Sep 17 00:00:00 2001 From: Jacek Date: Tue, 31 May 2022 09:05:42 +0200 Subject: [PATCH] SONAR-16232 Drop usage of deprecated org.sonar.api.SonarQubeVersion --- .../org/sonar/ce/container/ComputeEngineContainerImpl.java | 4 ++-- .../sonar/server/platform/platformlevel/PlatformLevel1.java | 4 ++-- .../org/sonar/scanner/bootstrap/SpringGlobalContainer.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java index 3a30af5138a..1385558c175 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java @@ -75,6 +75,7 @@ import org.sonar.core.platform.EditionProvider; import org.sonar.core.platform.PlatformEditionProvider; import org.sonar.core.platform.PluginClassLoader; import org.sonar.core.platform.PluginClassloaderFactory; +import org.sonar.core.platform.SonarQubeVersion; import org.sonar.core.platform.SpringComponentContainer; import org.sonar.core.util.UuidFactoryImpl; import org.sonar.db.DBSessionsImpl; @@ -276,8 +277,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer { props.rawProperties(), ThreadLocalSettings.class, new ConfigurationProvider(), - new org.sonar.api.SonarQubeVersion(sqVersion), - new org.sonar.core.platform.SonarQubeVersion(sqVersion), + new SonarQubeVersion(sqVersion), SonarRuntimeImpl.forSonarQube(apiVersion, SonarQubeSide.COMPUTE_ENGINE, edition), CeProcessLogging.class, UuidFactoryImpl.INSTANCE, diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java index 89ffe5944ec..9bbc457e8dd 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java @@ -30,6 +30,7 @@ import org.sonar.api.utils.Version; import org.sonar.core.config.CorePropertyDefinitions; import org.sonar.core.extension.CoreExtensionRepositoryImpl; import org.sonar.core.extension.CoreExtensionsLoader; +import org.sonar.core.platform.SonarQubeVersion; import org.sonar.core.util.UuidFactoryImpl; import org.sonar.db.DBSessionsImpl; import org.sonar.db.DaoModule; @@ -92,8 +93,7 @@ public class PlatformLevel1 extends PlatformLevel { SonarEdition edition = MetadataLoader.loadEdition(System2.INSTANCE); add( - new org.sonar.api.SonarQubeVersion(sqVersion), - new org.sonar.core.platform.SonarQubeVersion(sqVersion), + new SonarQubeVersion(sqVersion), SonarRuntimeImpl.forSonarQube(apiVersion, SonarQubeSide.SERVER, edition), ThreadLocalSettings.class, ConfigurationProvider.class, diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java index dca880238dc..78be7024302 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java @@ -42,6 +42,7 @@ import org.sonar.core.platform.PluginClassLoader; import org.sonar.core.platform.PluginClassloaderFactory; import org.sonar.core.platform.PluginInfo; import org.sonar.core.platform.PluginRepository; +import org.sonar.core.platform.SonarQubeVersion; import org.sonar.core.platform.SpringComponentContainer; import org.sonar.core.util.DefaultHttpDownloader; import org.sonar.core.util.UuidFactoryImpl; @@ -90,8 +91,7 @@ public class SpringGlobalContainer extends SpringComponentContainer { PluginClassloaderFactory.class, ScannerPluginJarExploder.class, ExtensionInstaller.class, - new org.sonar.api.SonarQubeVersion(sqVersion), - new org.sonar.core.platform.SonarQubeVersion(sqVersion), + new SonarQubeVersion(sqVersion), new GlobalServerSettingsProvider(), new GlobalConfigurationProvider(), new ScannerWsClientProvider(), -- 2.39.5