aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java4
-rw-r--r--plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java10
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java6
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java18
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDef.java13
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefs.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java)18
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyFieldDef.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyFieldDefinition.java)26
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java10
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/platform/ComponentContainer.java12
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefTest.java4
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefsTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java)24
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java4
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java20
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/workflow/condition/HasProjectPropertyConditionTest.java5
-rw-r--r--sonar-server/src/main/java/org/sonar/server/platform/ServerSettings.java7
-rw-r--r--sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java6
-rw-r--r--sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java6
-rw-r--r--sonar-server/src/test/java/org/sonar/server/issue/ServerIssueFinderTest.java2
-rw-r--r--sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java8
-rw-r--r--sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java14
-rw-r--r--sonar-server/src/test/java/org/sonar/server/startup/RenameDeprecatedPropertyKeysTest.java8
22 files changed, 111 insertions, 118 deletions
diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java
index 26d5637373f..ed3038909ea 100644
--- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java
+++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java
@@ -22,7 +22,7 @@ package org.sonar.plugins.cpd;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import org.sonar.api.resources.Java;
import org.sonar.api.resources.Language;
@@ -44,7 +44,7 @@ public class CpdSensorTest {
IndexFactory indexFactory = mock(IndexFactory.class);
sonarEngine = new SonarEngine(indexFactory, null, null, null);
sonarBridgeEngine = new SonarBridgeEngine(indexFactory, null, null);
- settings = new Settings(new PropertyDefinitions(CpdPlugin.class));
+ settings = new Settings(new PropertyDefs(CpdPlugin.class));
sensor = new CpdSensor(sonarEngine, sonarBridgeEngine, settings);
}
diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java
index 6a396887de3..38443e3097a 100644
--- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java
+++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java
@@ -21,7 +21,7 @@ package org.sonar.plugins.dbcleaner;
import org.junit.Test;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import org.sonar.api.resources.Scopes;
import org.sonar.core.purge.PurgeDao;
@@ -31,15 +31,13 @@ import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyLong;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
public class DefaultPurgeTaskTest {
@Test
public void shouldNotDeleteHistoricalDataOfDirectories() {
PurgeDao purgeDao = mock(PurgeDao.class);
- Settings settings = new Settings(new PropertyDefinitions(DefaultPurgeTask.class));
+ Settings settings = new Settings(new PropertyDefs(DefaultPurgeTask.class));
settings.setProperty(DbCleanerConstants.PROPERTY_CLEAN_DIRECTORY, "false");
DefaultPurgeTask task = new DefaultPurgeTask(purgeDao, settings, mock(DefaultPeriodCleaner.class), mock(PurgeProfiler.class));
@@ -51,7 +49,7 @@ public class DefaultPurgeTaskTest {
@Test
public void shouldDeleteHistoricalDataOfDirectoriesByDefault() {
PurgeDao purgeDao = mock(PurgeDao.class);
- Settings settings = new Settings(new PropertyDefinitions(DefaultPurgeTask.class));
+ Settings settings = new Settings(new PropertyDefs(DefaultPurgeTask.class));
DefaultPurgeTask task = new DefaultPurgeTask(purgeDao, settings, mock(DefaultPeriodCleaner.class), mock(PurgeProfiler.class));
task.purge(1L);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
index 72d038aa58d..1bedd4b6b99 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
@@ -26,7 +26,7 @@ import org.json.simple.JSONValue;
import org.slf4j.LoggerFactory;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import javax.annotation.Nullable;
@@ -44,9 +44,9 @@ public class BatchSettings extends Settings {
private final BootstrapSettings bootstrapSettings;
private final ServerClient client;
- public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefinitions propertyDefinitions,
+ public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefs propertyDefs,
ServerClient client, Configuration deprecatedConfiguration) {
- super(propertyDefinitions);
+ super(propertyDefs);
this.bootstrapSettings = bootstrapSettings;
this.client = client;
this.deprecatedConfiguration = deprecatedConfiguration;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java
index 7ac5b3ba19b..870a88002b2 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java
@@ -23,7 +23,7 @@ import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.junit.Test;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import java.util.Collections;
import java.util.Map;
@@ -52,7 +52,7 @@ public class BatchSettingsTest {
// Reconstruct bootstrap settings to get system property
bootstrapSettings = new BootstrapSettings(new BootstrapProperties(Collections.<String, String> emptyMap()));
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getString("BatchSettingsTest.testSystemProp")).isEqualTo("system");
}
@@ -63,7 +63,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
project.setProperty("project.prop", "project");
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
assertThat(batchSettings.getString("project.prop")).isEqualTo("project");
@@ -73,7 +73,7 @@ public class BatchSettingsTest {
public void should_load_global_settings() {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getBoolean("sonar.cpd.cross")).isTrue();
}
@@ -83,7 +83,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
assertThat(batchSettings.getString("sonar.java.coveragePlugin")).isEqualTo("jacoco");
@@ -94,7 +94,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
Map<String, String> moduleSettings = batchSettings.getModuleProperties("struts-core");
@@ -109,7 +109,7 @@ public class BatchSettingsTest {
System.setProperty("BatchSettingsTest.testSystemProp", "system");
project.setProperty("BatchSettingsTest.testSystemProp", "build");
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getString("BatchSettingsTest.testSystemProp")).isEqualTo("system");
}
@@ -119,7 +119,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
assertThat(deprecatedConf.getString("sonar.cpd.cross")).isEqualTo("true");
@@ -137,7 +137,7 @@ public class BatchSettingsTest {
@Test
public void project_should_be_optional() {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getProperties()).isNotEmpty();
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java
index e3487f6dd79..1207c93e7f8 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java
@@ -24,7 +24,7 @@ import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.junit.Test;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.batch.bootstrap.BatchSettings;
import java.util.List;
@@ -52,7 +52,7 @@ public class ModuleSettingsTest {
@Test
public void test_loading_of_module_settings() {
BatchSettings batchSettings = mock(BatchSettings.class);
- when(batchSettings.getDefinitions()).thenReturn(new PropertyDefinitions());
+ when(batchSettings.getDefinitions()).thenReturn(new PropertyDefs());
when(batchSettings.getProperties()).thenReturn(ImmutableMap.of(
"overridding", "batch",
"on-batch", "true"
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDef.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDef.java
index 7f33bb0e4db..a8736d58661 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDef.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDef.java
@@ -32,6 +32,7 @@ import org.sonar.api.ServerExtension;
import org.sonar.api.resources.Qualifiers;
import javax.annotation.Nullable;
+
import java.util.Arrays;
import java.util.List;
@@ -71,7 +72,7 @@ public final class PropertyDef implements BatchExtension, ServerExtension {
private boolean multiValues;
private String propertySetKey;
private String deprecatedKey;
- private List<PropertyFieldDefinition> fields;
+ private List<PropertyFieldDef> fields;
private String subcategory;
private int index;
@@ -108,7 +109,7 @@ public final class PropertyDef implements BatchExtension, ServerExtension {
.options(Arrays.asList(annotation.options()))
.multiValues(annotation.multiValues())
.propertySetKey(annotation.propertySetKey())
- .fields(PropertyFieldDefinition.create(annotation.fields()))
+ .fields(PropertyFieldDef.create(annotation.fields()))
.deprecatedKey(annotation.deprecatedKey());
List<String> qualifiers = newArrayList();
if (annotation.project()) {
@@ -226,7 +227,7 @@ public final class PropertyDef implements BatchExtension, ServerExtension {
return propertySetKey;
}
- public List<PropertyFieldDefinition> fields() {
+ public List<PropertyFieldDef> fields() {
return fields;
}
@@ -279,7 +280,7 @@ public final class PropertyDef implements BatchExtension, ServerExtension {
private List<String> options = newArrayList();
private boolean multiValues = false;
private String propertySetKey = "";
- private List<PropertyFieldDefinition> fields = newArrayList();
+ private List<PropertyFieldDef> fields = newArrayList();
private String deprecatedKey = "";
private boolean hidden = false;
private int index = 999;
@@ -362,12 +363,12 @@ public final class PropertyDef implements BatchExtension, ServerExtension {
return this;
}
- public Builder fields(PropertyFieldDefinition first, PropertyFieldDefinition... rest) {
+ public Builder fields(PropertyFieldDef first, PropertyFieldDef... rest) {
this.fields.addAll(Lists.asList(first, rest));
return this;
}
- public Builder fields(List<PropertyFieldDefinition> fields) {
+ public Builder fields(List<PropertyFieldDef> fields) {
this.fields.addAll(ImmutableList.copyOf(fields));
return this;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefs.java
index 452ba25f82e..a8a55ede663 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefs.java
@@ -37,7 +37,7 @@ import java.util.*;
*
* @since 2.12
*/
-public final class PropertyDefinitions implements BatchComponent, ServerComponent {
+public final class PropertyDefs implements BatchComponent, ServerComponent {
private final Map<String, PropertyDef> definitions = Maps.newHashMap();
private final Map<String, String> categories = Maps.newHashMap();
@@ -46,28 +46,28 @@ public final class PropertyDefinitions implements BatchComponent, ServerComponen
// deprecated key -> new key
private final Map<String, String> deprecatedKeys = Maps.newHashMap();
- public PropertyDefinitions(Object... components) {
+ public PropertyDefs(Object... components) {
if (components != null) {
addComponents(Arrays.asList(components));
}
}
- public PropertyDefinitions addComponents(Collection components) {
+ public PropertyDefs addComponents(Collection components) {
return addComponents(components, "");
}
- public PropertyDefinitions addComponents(Collection components, String defaultCategory) {
+ public PropertyDefs addComponents(Collection components, String defaultCategory) {
for (Object component : components) {
addComponent(component, defaultCategory);
}
return this;
}
- public PropertyDefinitions addComponent(Object object) {
+ public PropertyDefs addComponent(Object object) {
return addComponent(object, "");
}
- public PropertyDefinitions addComponent(Object component, String defaultCategory) {
+ public PropertyDefs addComponent(Object component, String defaultCategory) {
addComponentFromAnnotationProperty(component, defaultCategory);
if (component instanceof PropertyDef) {
PropertyDef propertyDefinition = (PropertyDef) component;
@@ -76,7 +76,7 @@ public final class PropertyDefinitions implements BatchComponent, ServerComponen
return this;
}
- private PropertyDefinitions addComponentFromAnnotationProperty(Object component, String defaultCategory) {
+ private PropertyDefs addComponentFromAnnotationProperty(Object component, String defaultCategory) {
Properties annotations = AnnotationUtils.getAnnotation(component, Properties.class);
if (annotations != null) {
for (Property property : annotations.value()) {
@@ -90,12 +90,12 @@ public final class PropertyDefinitions implements BatchComponent, ServerComponen
return this;
}
- private PropertyDefinitions addProperty(Property property, String defaultCategory) {
+ private PropertyDefs addProperty(Property property, String defaultCategory) {
PropertyDef definition = PropertyDef.create(property);
return add(definition, defaultCategory);
}
- private PropertyDefinitions add(PropertyDef definition, String defaultCategory) {
+ private PropertyDefs add(PropertyDef definition, String defaultCategory) {
if (!definitions.containsKey(definition.key())) {
definitions.put(definition.key(), definition);
categories.put(definition.key(), StringUtils.defaultIfBlank(definition.category(), defaultCategory));
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyFieldDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyFieldDef.java
index 3c3d4748ccd..f9928122df5 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyFieldDefinition.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyFieldDef.java
@@ -34,7 +34,7 @@ import static com.google.common.collect.Lists.newArrayList;
/**
* @since 3.3
*/
-public final class PropertyFieldDefinition {
+public final class PropertyFieldDef {
private final String key;
private final String name;
private final String description;
@@ -42,7 +42,7 @@ public final class PropertyFieldDefinition {
private final PropertyType type;
private final List<String> options;
- private PropertyFieldDefinition(Builder builder) {
+ private PropertyFieldDef(Builder builder) {
this.key = builder.key;
this.name = builder.name;
this.description = builder.description;
@@ -51,16 +51,16 @@ public final class PropertyFieldDefinition {
this.options = builder.options;
}
- static List<PropertyFieldDefinition> create(PropertyField[] fields) {
- List<PropertyFieldDefinition> definitions = newArrayList();
+ static List<PropertyFieldDef> create(PropertyField[] fields) {
+ List<PropertyFieldDef> definitions = newArrayList();
for (PropertyField field : fields) {
- definitions.add(PropertyFieldDefinition.build(field.key())
- .name(field.name())
- .description(field.description())
- .indicativeSize(field.indicativeSize())
- .type(field.type())
- .options(field.options())
- .build()
+ definitions.add(PropertyFieldDef.build(field.key())
+ .name(field.name())
+ .description(field.description())
+ .indicativeSize(field.indicativeSize())
+ .type(field.type())
+ .options(field.options())
+ .build()
);
}
return definitions;
@@ -145,10 +145,10 @@ public final class PropertyFieldDefinition {
return this;
}
- public PropertyFieldDefinition build() {
+ public PropertyFieldDef build() {
Preconditions.checkArgument(!Strings.isNullOrEmpty(key), "Key must be set");
Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "Name must be set");
- return new PropertyFieldDefinition(this);
+ return new PropertyFieldDef(this);
}
}
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
index f63934c6228..c6de094d007 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
@@ -51,14 +51,14 @@ import java.util.Properties;
public class Settings implements BatchComponent, ServerComponent {
protected Map<String, String> properties;
- protected PropertyDefinitions definitions;
+ protected PropertyDefs definitions;
private Encryption encryption;
public Settings() {
- this(new PropertyDefinitions());
+ this(new PropertyDefs());
}
- public Settings(PropertyDefinitions definitions) {
+ public Settings(PropertyDefs definitions) {
this.properties = Maps.newHashMap();
this.definitions = definitions;
this.encryption = new Encryption(this);
@@ -364,7 +364,7 @@ public class Settings implements BatchComponent, ServerComponent {
return ImmutableMap.copyOf(properties);
}
- public PropertyDefinitions getDefinitions() {
+ public PropertyDefs getDefinitions() {
return definitions;
}
@@ -373,7 +373,7 @@ public class Settings implements BatchComponent, ServerComponent {
* This method is usually used by unit tests.
*/
public static Settings createForComponent(Object component) {
- return new Settings(new PropertyDefinitions(component));
+ return new Settings(new PropertyDefs(component));
}
protected void doOnSetProperty(String key, @Nullable String value) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ComponentContainer.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ComponentContainer.java
index 860f297b032..21774a6631c 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ComponentContainer.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ComponentContainer.java
@@ -29,7 +29,7 @@ import org.picocontainer.lifecycle.ReflectionLifecycleStrategy;
import org.picocontainer.monitors.NullComponentMonitor;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import javax.annotation.Nullable;
@@ -42,7 +42,7 @@ public class ComponentContainer implements BatchComponent, ServerComponent {
ComponentContainer parent, child; // no need for multiple children
MutablePicoContainer pico;
- PropertyDefinitions propertyDefinitions;
+ PropertyDefs propertyDefs;
/**
* Create root container
@@ -51,8 +51,8 @@ public class ComponentContainer implements BatchComponent, ServerComponent {
this.parent = null;
this.child = null;
this.pico = createPicoContainer();
- propertyDefinitions = new PropertyDefinitions();
- addSingleton(propertyDefinitions);
+ propertyDefs = new PropertyDefs();
+ addSingleton(propertyDefs);
addSingleton(this);
}
@@ -63,7 +63,7 @@ public class ComponentContainer implements BatchComponent, ServerComponent {
this.parent = parent;
this.pico = parent.pico.makeChildContainer();
this.parent.child = this;
- this.propertyDefinitions = parent.propertyDefinitions;
+ this.propertyDefs = parent.propertyDefs;
addSingleton(this);
}
@@ -170,7 +170,7 @@ public class ComponentContainer implements BatchComponent, ServerComponent {
}
public void declareExtension(@Nullable PluginMetadata plugin, Object extension) {
- propertyDefinitions.addComponent(extension, plugin != null ? plugin.getName() : "");
+ propertyDefs.addComponent(extension, plugin != null ? plugin.getName() : "");
}
public ComponentContainer addPicoAdapter(ComponentAdapter adapter) {
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefTest.java
index 4a284b97c30..416ab35b4b7 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefTest.java
@@ -139,8 +139,8 @@ public class PropertyDefTest {
PropertyDef def = PropertyDef.builder("hello")
.name("Hello")
.fields(
- PropertyFieldDefinition.build("first").name("First").description("Description").options("A", "B").build(),
- PropertyFieldDefinition.build("second").name("Second").type(PropertyType.INTEGER).indicativeSize(5).build()
+ PropertyFieldDef.build("first").name("First").description("Description").options("A", "B").build(),
+ PropertyFieldDef.build("second").name("Second").type(PropertyType.INTEGER).indicativeSize(5).build()
)
.build();
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefsTest.java
index cdd9afc4f0e..5765ec28b64 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefsTest.java
@@ -26,11 +26,11 @@ import org.sonar.api.resources.Qualifiers;
import static org.fest.assertions.Assertions.assertThat;
-public class PropertyDefinitionsTest {
+public class PropertyDefsTest {
@Test
public void should_inspect_plugin_objects() {
- PropertyDefinitions def = new PropertyDefinitions(
+ PropertyDefs def = new PropertyDefs(
PropertyDef.builder("foo").name("Foo").build(),
PropertyDef.builder("one").name("One").build(),
PropertyDef.builder("two").name("Two").defaultValue("2").build()
@@ -41,21 +41,21 @@ public class PropertyDefinitionsTest {
@Test
public void should_inspect_annotation_plugin_objects() {
- PropertyDefinitions def = new PropertyDefinitions(new PluginWithProperty(), new PluginWithProperties());
+ PropertyDefs def = new PropertyDefs(new PluginWithProperty(), new PluginWithProperties());
assertProperties(def);
}
@Test
public void should_inspect_plugin_classes() {
- PropertyDefinitions def = new PropertyDefinitions(PluginWithProperty.class, PluginWithProperties.class);
+ PropertyDefs def = new PropertyDefs(PluginWithProperty.class, PluginWithProperties.class);
assertProperties(def);
}
@Test
public void test_categories() {
- PropertyDefinitions def = new PropertyDefinitions(
+ PropertyDefs def = new PropertyDefs(
PropertyDef.builder("inCateg").name("In Categ").category("categ").build(),
PropertyDef.builder("noCateg").name("No categ").build()
);
@@ -66,7 +66,7 @@ public class PropertyDefinitionsTest {
@Test
public void test_categories_on_annotation_plugin() {
- PropertyDefinitions def = new PropertyDefinitions(Categories.class);
+ PropertyDefs def = new PropertyDefs(Categories.class);
assertThat(def.getCategory("inCateg")).isEqualTo("categ");
assertThat(def.getCategory("noCateg")).isEqualTo("");
@@ -74,7 +74,7 @@ public class PropertyDefinitionsTest {
@Test
public void test_default_category() {
- PropertyDefinitions def = new PropertyDefinitions();
+ PropertyDefs def = new PropertyDefs();
def.addComponent(PropertyDef.builder("inCateg").name("In Categ").category("categ").build(), "default");
def.addComponent(PropertyDef.builder("noCateg").name("No categ").build(), "default");
@@ -84,7 +84,7 @@ public class PropertyDefinitionsTest {
@Test
public void test_default_category_on_annotation_plugin() {
- PropertyDefinitions def = new PropertyDefinitions();
+ PropertyDefs def = new PropertyDefs();
def.addComponent(Categories.class, "default");
assertThat(def.getCategory("inCateg")).isEqualTo("categ");
assertThat(def.getCategory("noCateg")).isEqualTo("default");
@@ -92,7 +92,7 @@ public class PropertyDefinitionsTest {
@Test
public void should_group_by_category() {
- PropertyDefinitions def = new PropertyDefinitions(
+ PropertyDefs def = new PropertyDefs(
PropertyDef.builder("global1").name("Global1").category("catGlobal1").build(),
PropertyDef.builder("global2").name("Global2").category("catGlobal1").build(),
PropertyDef.builder("global3").name("Global3").category("catGlobal2").build(),
@@ -110,7 +110,7 @@ public class PropertyDefinitionsTest {
@Test
public void should_group_by_subcategory() {
- PropertyDefinitions def = new PropertyDefinitions(
+ PropertyDefs def = new PropertyDefs(
PropertyDef.builder("global1").name("Global1").category("catGlobal1").subcategory("sub1").build(),
PropertyDef.builder("global2").name("Global2").category("catGlobal1").subcategory("sub2").build(),
PropertyDef.builder("global3").name("Global3").category("catGlobal1").build(),
@@ -123,14 +123,14 @@ public class PropertyDefinitionsTest {
@Test
public void should_group_by_category_on_annotation_plugin() {
- PropertyDefinitions def = new PropertyDefinitions(ByCategory.class);
+ PropertyDefs def = new PropertyDefs(ByCategory.class);
assertThat(def.getPropertiesByCategory().keySet()).containsOnly("catGlobal1", "catGlobal2");
assertThat(def.getPropertiesByCategory(Qualifiers.PROJECT).keySet()).containsOnly("catProject");
assertThat(def.getPropertiesByCategory(Qualifiers.MODULE).keySet()).containsOnly("catModule");
}
- private void assertProperties(PropertyDefinitions definitions) {
+ private void assertProperties(PropertyDefs definitions) {
assertThat(definitions.get("foo").name()).isEqualTo("Foo");
assertThat(definitions.get("one").name()).isEqualTo("One");
assertThat(definitions.get("two").name()).isEqualTo("Two");
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java
index 228e0ee6e12..91280833a91 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java
@@ -33,7 +33,7 @@ import static org.fest.assertions.Assertions.assertThat;
public class SettingsTest {
- private PropertyDefinitions definitions;
+ private PropertyDefs definitions;
@Properties({
@Property(key = "hello", name = "Hello", defaultValue = "world"),
@@ -57,7 +57,7 @@ public class SettingsTest {
@Before
public void init_definitions() {
- definitions = new PropertyDefinitions();
+ definitions = new PropertyDefs();
definitions.addComponent(Init.class);
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java
index 3e2c17c8c94..6a3bfa07658 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java
@@ -24,16 +24,14 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.api.Property;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import java.util.Arrays;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import static org.fest.assertions.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.*;
public class ComponentContainerTest {
@@ -159,9 +157,9 @@ public class ComponentContainerTest {
ComponentContainer container = new ComponentContainer();
container.addSingleton(ComponentWithProperty.class);
- PropertyDefinitions propertyDefinitions = container.getComponentByType(PropertyDefinitions.class);
- assertThat(propertyDefinitions.get("foo")).isNotNull();
- assertThat(propertyDefinitions.get("foo").defaultValue()).isEqualTo("bar");
+ PropertyDefs propertyDefs = container.getComponentByType(PropertyDefs.class);
+ assertThat(propertyDefs.get("foo")).isNotNull();
+ assertThat(propertyDefs.get("foo").defaultValue()).isEqualTo("bar");
}
@Test
@@ -170,8 +168,8 @@ public class ComponentContainerTest {
PluginMetadata plugin = mock(PluginMetadata.class);
container.declareExtension(plugin, ComponentWithProperty.class);
- PropertyDefinitions propertyDefinitions = container.getComponentByType(PropertyDefinitions.class);
- assertThat(propertyDefinitions.get("foo")).isNotNull();
+ PropertyDefs propertyDefs = container.getComponentByType(PropertyDefs.class);
+ assertThat(propertyDefs.get("foo")).isNotNull();
assertThat(container.getComponentByType(ComponentWithProperty.class)).isNull();
}
@@ -181,8 +179,8 @@ public class ComponentContainerTest {
PluginMetadata plugin = mock(PluginMetadata.class);
container.addExtension(plugin, ComponentWithProperty.class);
- PropertyDefinitions propertyDefinitions = container.getComponentByType(PropertyDefinitions.class);
- assertThat(propertyDefinitions.get("foo")).isNotNull();
+ PropertyDefs propertyDefs = container.getComponentByType(PropertyDefs.class);
+ assertThat(propertyDefs.get("foo")).isNotNull();
assertThat(container.getComponentByType(ComponentWithProperty.class)).isNotNull();
assertThat(container.getComponentByKey(ComponentWithProperty.class)).isNotNull();
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/workflow/condition/HasProjectPropertyConditionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/workflow/condition/HasProjectPropertyConditionTest.java
index 5d0bdd41c53..32a382cb6d3 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/workflow/condition/HasProjectPropertyConditionTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/workflow/condition/HasProjectPropertyConditionTest.java
@@ -22,12 +22,11 @@ package org.sonar.api.workflow.condition;
import org.junit.Test;
import org.sonar.api.Properties;
import org.sonar.api.Property;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import org.sonar.api.workflow.internal.DefaultReview;
import org.sonar.api.workflow.internal.DefaultWorkflowContext;
-
import static org.fest.assertions.Assertions.assertThat;
public class HasProjectPropertyConditionTest {
@@ -51,7 +50,7 @@ public class HasProjectPropertyConditionTest {
public void returnTrueIfDefaultValue() {
HasProjectPropertyCondition condition = new HasProjectPropertyCondition("jira.url");
DefaultWorkflowContext context = new DefaultWorkflowContext();
- context.setSettings(new Settings(new PropertyDefinitions().addComponent(WithDefaultValue.class)));
+ context.setSettings(new Settings(new PropertyDefs().addComponent(WithDefaultValue.class)));
assertThat(condition.doVerify(new DefaultReview(), context)).isTrue();
}
diff --git a/sonar-server/src/main/java/org/sonar/server/platform/ServerSettings.java b/sonar-server/src/main/java/org/sonar/server/platform/ServerSettings.java
index d4b451e43e1..115e010fff8 100644
--- a/sonar-server/src/main/java/org/sonar/server/platform/ServerSettings.java
+++ b/sonar-server/src/main/java/org/sonar/server/platform/ServerSettings.java
@@ -22,12 +22,13 @@ package org.sonar.server.platform;
import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.configuration.Configuration;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import org.sonar.core.config.ConfigurationUtils;
import javax.annotation.Nullable;
import javax.servlet.ServletContext;
+
import java.io.File;
import java.util.Collections;
import java.util.Map;
@@ -52,12 +53,12 @@ public class ServerSettings extends Settings {
private File deployDir;
private File sonarHome;
- public ServerSettings(PropertyDefinitions definitions, Configuration deprecatedConfiguration, ServletContext servletContext) {
+ public ServerSettings(PropertyDefs definitions, Configuration deprecatedConfiguration, ServletContext servletContext) {
this(definitions, deprecatedConfiguration, getDeployDir(servletContext), SonarHome.getHome());
}
@VisibleForTesting
- ServerSettings(PropertyDefinitions definitions, Configuration deprecatedConfiguration, File deployDir, File sonarHome) {
+ ServerSettings(PropertyDefs definitions, Configuration deprecatedConfiguration, File deployDir, File sonarHome) {
super(definitions);
this.deprecatedConfiguration = deprecatedConfiguration;
this.deployDir = deployDir;
diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java b/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java
index 93bcd99ca3e..ac4a2aace4d 100644
--- a/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java
+++ b/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java
@@ -22,7 +22,7 @@ package org.sonar.server.startup;
import com.google.common.base.Strings;
import org.slf4j.LoggerFactory;
import org.sonar.api.config.PropertyDef;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.core.properties.PropertiesDao;
/**
@@ -31,9 +31,9 @@ import org.sonar.core.properties.PropertiesDao;
public class RenameDeprecatedPropertyKeys {
private PropertiesDao dao;
- private PropertyDefinitions definitions;
+ private PropertyDefs definitions;
- public RenameDeprecatedPropertyKeys(PropertiesDao dao, PropertyDefinitions definitions) {
+ public RenameDeprecatedPropertyKeys(PropertiesDao dao, PropertyDefs definitions) {
this.dao = dao;
this.definitions = definitions;
}
diff --git a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
index 0e16d6329d7..5892a089b21 100644
--- a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
+++ b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
@@ -23,7 +23,7 @@ import com.google.common.collect.ListMultimap;
import org.slf4j.LoggerFactory;
import org.sonar.api.CoreProperties;
import org.sonar.api.config.License;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.platform.NewUserHandler;
@@ -185,8 +185,8 @@ public final class JRubyFacade {
}
// PLUGINS ------------------------------------------------------------------
- public PropertyDefinitions getPropertyDefinitions() {
- return get(PropertyDefinitions.class);
+ public PropertyDefs getPropertyDefinitions() {
+ return get(PropertyDefs.class);
}
public boolean hasPlugin(String key) {
diff --git a/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueFinderTest.java b/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueFinderTest.java
index 9a72ad109fd..5fd1ef8a476 100644
--- a/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueFinderTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueFinderTest.java
@@ -135,7 +135,7 @@ public class ServerIssueFinderTest {
IssueFinder.Results results = finder.find(issueQuery, null, UserRole.USER);
assertThat(results.pagination().offset()).isEqualTo(0);
- assertThat(results.pagination().count()).isEqualTo(2);
+ assertThat(results.pagination().size()).isEqualTo(2);
assertThat(results.pagination().pages()).isEqualTo(2);
// Only one result is expected because the limit is 1
diff --git a/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java b/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java
index f03e69bcc2f..dc034d3807b 100644
--- a/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java
@@ -24,7 +24,7 @@ import org.apache.commons.configuration.PropertiesConfiguration;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentMatcher;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.core.properties.PropertiesDao;
import org.sonar.core.properties.PropertyDto;
@@ -34,9 +34,7 @@ import java.util.Arrays;
import static org.fest.assertions.Assertions.assertThat;
import static org.mockito.Matchers.argThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
public class PersistentSettingsTest {
@@ -47,7 +45,7 @@ public class PersistentSettingsTest {
public void init() throws URISyntaxException {
dao = mock(PropertiesDao.class);
settings = new ServerSettings(
- new PropertyDefinitions(),
+ new PropertyDefs(),
new PropertiesConfiguration(),
new File("."),
new File(PersistentSettingsTest.class.getResource("/org/sonar/server/platform/PersistentSettingsTest/").toURI()));
diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java
index a9b181ca343..46ae543034f 100644
--- a/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.configuration.BaseConfiguration;
import org.junit.Test;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import java.io.File;
import java.net.URISyntaxException;
@@ -36,7 +36,7 @@ public class ServerSettingsTest {
@Test
public void load_properties_file() {
- ServerSettings settings = new ServerSettings(new PropertyDefinitions(), new BaseConfiguration(), new File("."), home);
+ ServerSettings settings = new ServerSettings(new PropertyDefs(), new BaseConfiguration(), new File("."), home);
assertThat(settings.getString("hello")).isEqualTo("world");
}
@@ -44,7 +44,7 @@ public class ServerSettingsTest {
@Test
public void systemPropertiesShouldOverridePropertiesFile() {
System.setProperty("ServerSettingsTestEnv", "in_env");
- ServerSettings settings = new ServerSettings(new PropertyDefinitions(), new BaseConfiguration(), new File("."), home);
+ ServerSettings settings = new ServerSettings(new PropertyDefs(), new BaseConfiguration(), new File("."), home);
assertThat(settings.getString("ServerSettingsTestEnv")).isEqualTo("in_env");
}
@@ -52,12 +52,12 @@ public class ServerSettingsTest {
@Test(expected = IllegalStateException.class)
public void fail_if_properties_file_is_not_found() {
File sonarHome = new File("unknown/path");
- new ServerSettings(new PropertyDefinitions(), new BaseConfiguration(), new File("."), sonarHome);
+ new ServerSettings(new PropertyDefs(), new BaseConfiguration(), new File("."), sonarHome);
}
@Test
public void activateDatabaseSettings() {
- ServerSettings settings = new ServerSettings(new PropertyDefinitions(), new BaseConfiguration(), new File("."), home);
+ ServerSettings settings = new ServerSettings(new PropertyDefs(), new BaseConfiguration(), new File("."), home);
Map<String, String> databaseProperties = ImmutableMap.of("in_db", "true");
settings.activateDatabaseSettings(databaseProperties);
@@ -67,7 +67,7 @@ public class ServerSettingsTest {
@Test
public void file_settings_override_db_settings() {
- ServerSettings settings = new ServerSettings(new PropertyDefinitions(), new BaseConfiguration(), new File("."), home);
+ ServerSettings settings = new ServerSettings(new PropertyDefs(), new BaseConfiguration(), new File("."), home);
assertThat(settings.getString("in_file")).isEqualTo("true");
Map<String, String> databaseProperties = ImmutableMap.of("in_file", "false");
@@ -79,7 +79,7 @@ public class ServerSettingsTest {
@Test
public void synchronize_deprecated_commons_configuration() {
BaseConfiguration deprecated = new BaseConfiguration();
- ServerSettings settings = new ServerSettings(new PropertyDefinitions(), deprecated, new File("."), home);
+ ServerSettings settings = new ServerSettings(new PropertyDefs(), deprecated, new File("."), home);
assertThat(settings.getString("in_file")).isEqualTo("true");
assertThat(deprecated.getString("in_file")).isEqualTo("true");
diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RenameDeprecatedPropertyKeysTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RenameDeprecatedPropertyKeysTest.java
index 00223cfc401..e08e5ecda91 100644
--- a/sonar-server/src/test/java/org/sonar/server/startup/RenameDeprecatedPropertyKeysTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/startup/RenameDeprecatedPropertyKeysTest.java
@@ -22,18 +22,16 @@ package org.sonar.server.startup;
import org.junit.Test;
import org.sonar.api.Properties;
import org.sonar.api.Property;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.core.properties.PropertiesDao;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.*;
public class RenameDeprecatedPropertyKeysTest {
@Test
public void should_rename_deprecated_keys() {
PropertiesDao dao = mock(PropertiesDao.class);
- PropertyDefinitions definitions = new PropertyDefinitions(FakeExtension.class);
+ PropertyDefs definitions = new PropertyDefs(FakeExtension.class);
RenameDeprecatedPropertyKeys task = new RenameDeprecatedPropertyKeys(dao, definitions);
task.start();