From b7343f0f17e5ae2e430b1fa7561986a9df2a107d Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Fri, 1 Jul 2016 12:35:42 +0200 Subject: [PATCH] SONAR-7727 Remove some deprecated properties --- .../src/main/java/CreateSubProjects.java | 4 +- .../src/main/java/RenameProject.java | 6 +-- .../ComputeEngineContainerImplTest.java | 20 +++---- .../core/config/CorePropertyDefinitions.java | 11 +--- .../java/org/sonar/api/CoreProperties.java | 52 +------------------ .../api/batch/bootstrap/ProjectBuilder.java | 10 +--- .../org/sonar/batch/ProjectConfigurator.java | 19 +------ .../sonar/batch/ProjectConfiguratorTest.java | 27 ---------- 8 files changed, 19 insertions(+), 130 deletions(-) diff --git a/it/it-plugins/project-builder-plugin/src/main/java/CreateSubProjects.java b/it/it-plugins/project-builder-plugin/src/main/java/CreateSubProjects.java index b15196f38fc..19f74ae5a7c 100644 --- a/it/it-plugins/project-builder-plugin/src/main/java/CreateSubProjects.java +++ b/it/it-plugins/project-builder-plugin/src/main/java/CreateSubProjects.java @@ -31,9 +31,7 @@ public final class CreateSubProjects extends ProjectBuilder { private Settings settings; - public CreateSubProjects(ProjectReactor reactor, Settings settings) { - super(reactor); - + public CreateSubProjects(Settings settings) { // A real implementation should for example use the configuration this.settings = settings; } diff --git a/it/it-plugins/project-builder-plugin/src/main/java/RenameProject.java b/it/it-plugins/project-builder-plugin/src/main/java/RenameProject.java index de8cedfcaa7..0e445973c1f 100644 --- a/it/it-plugins/project-builder-plugin/src/main/java/RenameProject.java +++ b/it/it-plugins/project-builder-plugin/src/main/java/RenameProject.java @@ -1,3 +1,4 @@ + /* * SonarQube * Copyright (C) 2009-2016 SonarSource SA @@ -28,9 +29,8 @@ import org.sonar.api.config.Settings; public final class RenameProject extends ProjectBuilder { private Settings settings; - - public RenameProject(ProjectReactor reactor, Settings settings) { - super(reactor); + + public RenameProject(Settings settings) { this.settings = settings; } diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java index 4a3267e4ce7..60cbe067609 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java @@ -19,15 +19,6 @@ */ package org.sonar.ce.container; -import static java.lang.String.valueOf; -import static org.assertj.core.api.Assertions.assertThat; -import static org.sonar.process.ProcessEntryPoint.PROPERTY_PROCESS_INDEX; -import static org.sonar.process.ProcessEntryPoint.PROPERTY_SHARED_PATH; -import static org.sonar.process.ProcessProperties.PATH_DATA; -import static org.sonar.process.ProcessProperties.PATH_HOME; -import static org.sonar.process.ProcessProperties.PATH_TEMP; -import static org.sonar.process.ProcessProperties.STARTED_AT; - import java.io.File; import java.io.IOException; import java.util.Date; @@ -43,6 +34,15 @@ import org.sonar.db.DbTester; import org.sonar.process.ProcessId; import org.sonar.process.Props; +import static java.lang.String.valueOf; +import static org.assertj.core.api.Assertions.assertThat; +import static org.sonar.process.ProcessEntryPoint.PROPERTY_PROCESS_INDEX; +import static org.sonar.process.ProcessEntryPoint.PROPERTY_SHARED_PATH; +import static org.sonar.process.ProcessProperties.PATH_DATA; +import static org.sonar.process.ProcessProperties.PATH_HOME; +import static org.sonar.process.ProcessProperties.PATH_TEMP; +import static org.sonar.process.ProcessProperties.STARTED_AT; + public class ComputeEngineContainerImplTest { private static final int CONTAINER_ITSELF = 1; private static final int COMPONENTS_IN_LEVEL_1_AT_CONSTRUCTION = CONTAINER_ITSELF + 1; @@ -102,7 +102,7 @@ public class ComputeEngineContainerImplTest { + 22 // level 1 + 46 // content of DaoModule + 1 // content of EsSearchModule - + 56 // content of CorePropertyDefinitions + + 55 // content of CorePropertyDefinitions + 1 // content of CePropertyDefinitions ); assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull(); diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 08305b9ab15..d0728366983 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -19,8 +19,6 @@ */ package org.sonar.core.config; -import static org.sonar.api.database.DatabaseProperties.PROP_PASSWORD; - import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.Arrays; @@ -30,6 +28,8 @@ import org.sonar.api.PropertyType; import org.sonar.api.config.PropertyDefinition; import org.sonar.api.resources.Qualifiers; +import static org.sonar.api.database.DatabaseProperties.PROP_PASSWORD; + public class CorePropertyDefinitions { /* Time machine periods */ @@ -212,13 +212,6 @@ public class CorePropertyDefinitions { // BATCH - PropertyDefinition.builder(CoreProperties.CORE_VIOLATION_LOCALE_PROPERTY) - .defaultValue("en") - .name("Locale used for issue messages") - .description("Deprecated property. Keep default value for backward compatibility.") - .hidden() - .build(), - PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 1) .name("Leak Period") .description("Period used to compare measures and track new issues. Values are :