diff options
author | Julien HENRY <henryju@yahoo.fr> | 2016-06-14 17:57:35 +0200 |
---|---|---|
committer | Julien HENRY <henryju@yahoo.fr> | 2016-07-05 14:00:16 +0200 |
commit | c7206381a3e009e4b19b0844fe1ac732daead2b2 (patch) | |
tree | 1de88ef8d7283e22ce034a74f7bd28b4bf0c3005 /sonar-plugin-api | |
parent | 4b54d70424c0ce23f45c6cac028986b8718b135c (diff) | |
download | sonarqube-c7206381a3e009e4b19b0844fe1ac732daead2b2.tar.gz sonarqube-c7206381a3e009e4b19b0844fe1ac732daead2b2.zip |
SONAR-7727 Remove deprecated metrics + methods on Settings
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 3 insertions, 212 deletions
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 8946bc77393..f2cdf1aad8d 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 @@ -379,22 +379,6 @@ public class Settings { return this; } - /** - * @deprecated since 4.4 For embedding purpose all properties should be provided by the bootstrapper - */ - @Deprecated - public Settings addSystemProperties() { - return addProperties(System.getProperties()); - } - - /** - * @deprecated since 4.4 For embedding purpose all properties should be provided by the bootstrapper - */ - @Deprecated - public Settings addEnvironmentVariables() { - return addProperties(System.getenv()); - } - public Settings setProperties(Map<String, String> props) { clear(); return addProperties(props); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java index bb76445812c..745bad2dbb5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java @@ -178,23 +178,6 @@ public final class CoreMetrics { .setDomain(DOMAIN_SIZE) .create(); - /** - * @deprecated since 4.2 there is now only directory - */ - @Deprecated - public static final String PACKAGES_KEY = "packages"; - /** - * @deprecated since 4.2 there is now only directory - */ - @Deprecated - public static final Metric<Integer> PACKAGES = new Metric.Builder(PACKAGES_KEY, "Packages", Metric.ValueType.INT) - .setDescription("Packages") - .setDirection(Metric.DIRECTION_WORST) - .setQualitative(false) - .setDomain(DOMAIN_SIZE) - .setHidden(true) - .create(); - public static final String FUNCTIONS_KEY = "functions"; public static final Metric<Integer> FUNCTIONS = new Metric.Builder(FUNCTIONS_KEY, "Functions", Metric.ValueType.INT) .setDescription("Functions") @@ -1734,150 +1717,6 @@ public final class CoreMetrics { // -------------------------------------------------------------------------------------------------------------------- /** - * @deprecated since 4.0. See SONAR-4643 - */ - @Deprecated - public static final String DEPTH_IN_TREE_KEY = "dit"; - /** - * @deprecated since 4.0. See SONAR-4643 - */ - @Deprecated - public static final transient Metric<Integer> DEPTH_IN_TREE = new Metric.Builder(DEPTH_IN_TREE_KEY, "Depth in Tree", Metric.ValueType.INT) - .setDescription("Depth in Inheritance Tree") - .setDirection(Metric.DIRECTION_NONE) - .setQualitative(false) - .setDomain(DOMAIN_DESIGN) - .setHidden(true) - .create(); - - /** - * @deprecated since 4.0. See SONAR-4643 - */ - @Deprecated - public static final String NUMBER_OF_CHILDREN_KEY = "noc"; - /** - * @deprecated since 4.0. See SONAR-4643 - */ - @Deprecated - public static final transient Metric<Integer> NUMBER_OF_CHILDREN = new Metric.Builder(NUMBER_OF_CHILDREN_KEY, "Number of Children", Metric.ValueType.INT) - .setDescription("Number of Children") - .setDirection(Metric.DIRECTION_NONE) - .setQualitative(false) - .setDomain(DOMAIN_DESIGN) - .setHidden(true) - .create(); - - /** - * @deprecated since 4.2. See SONAR-5042 - */ - @Deprecated - public static final String RFC_KEY = "rfc"; - - /** - * @deprecated since 4.2. See SONAR-5042 - */ - @Deprecated - public static final transient Metric<Integer> RFC = new Metric.Builder(RFC_KEY, "RFC", Metric.ValueType.INT) - .setDescription("Response for Class") - .setDirection(Metric.DIRECTION_WORST) - .setQualitative(false) - .setDomain(DOMAIN_DESIGN) - .setHidden(true) - .create(); - - /** - * @deprecated since 4.2. See SONAR-5042 - */ - @Deprecated - public static final String RFC_DISTRIBUTION_KEY = "rfc_distribution"; - - /** - * @deprecated since 4.2. See SONAR-5042 - */ - @Deprecated - public static final transient Metric<String> RFC_DISTRIBUTION = new Metric.Builder(RFC_DISTRIBUTION_KEY, "Class Distribution / RFC", Metric.ValueType.DISTRIB) - .setDescription("Class distribution /RFC") - .setDirection(Metric.DIRECTION_NONE) - .setQualitative(true) - .setDomain(DOMAIN_DESIGN) - .setHidden(true) - .create(); - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final String LCOM4_KEY = "lcom4"; - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final transient Metric<Double> LCOM4 = new Metric.Builder(LCOM4_KEY, "LCOM4", Metric.ValueType.FLOAT) - .setDescription("Lack of Cohesion of Functions") - .setDirection(Metric.DIRECTION_WORST) - .setQualitative(true) - .setDomain(DOMAIN_DESIGN) - .setBestValue(1.0) - .setHidden(true) - .create(); - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final String LCOM4_BLOCKS_KEY = "lcom4_blocks"; - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final transient Metric<String> LCOM4_BLOCKS = new Metric.Builder(LCOM4_BLOCKS_KEY, "LCOM4 Blocks", Metric.ValueType.DATA) - .setDescription("LCOM4 blocks") - .setDirection(Metric.DIRECTION_NONE) - .setQualitative(false) - .setDomain(DOMAIN_DESIGN) - .setDeleteHistoricalData(true) - .setHidden(true) - .create(); - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final String LCOM4_DISTRIBUTION_KEY = "lcom4_distribution"; - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final transient Metric<String> LCOM4_DISTRIBUTION = new Metric.Builder(LCOM4_DISTRIBUTION_KEY, "Class Distribution / LCOM4", Metric.ValueType.DISTRIB) - .setDescription("Class distribution /LCOM4") - .setDirection(Metric.DIRECTION_NONE) - .setQualitative(true) - .setDomain(DOMAIN_DESIGN) - .setHidden(true) - .create(); - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final String SUSPECT_LCOM4_DENSITY_KEY = "suspect_lcom4_density"; - - /** - * @deprecated in 4.1. See http://jira.sonarsource.com/browse/SONAR-4853 - */ - @Deprecated - public static final transient Metric<Double> SUSPECT_LCOM4_DENSITY = new Metric.Builder(SUSPECT_LCOM4_DENSITY_KEY, "Suspect LCOM4 Density", Metric.ValueType.PERCENT) - .setDescription("Density of classes having LCOM4>1") - .setDirection(Metric.DIRECTION_WORST) - .setQualitative(true) - .setDomain(DOMAIN_DESIGN) - .setHidden(true) - .create(); - - /** * @deprecated since 5.0 this is an internal metric that should not be accessed by plugins */ @Deprecated @@ -2425,7 +2264,7 @@ public final class CoreMetrics { */ public static final Metric<Long> NEW_SECURITY_REMEDIATION_EFFORT = new Metric.Builder(NEW_SECURITY_REMEDIATION_EFFORT_KEY, "Security Remediation Effort on New Code", Metric.ValueType.WORK_DUR) - .setDescription("Security remediation effort on new code") + .setDescription("Security remediation effort on new code") .setDomain(DOMAIN_SECURITY) .setDirection(Metric.DIRECTION_WORST) .setOptimizedBestValue(true) @@ -2540,38 +2379,6 @@ public final class CoreMetrics { .create(); /** - * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY} - */ - @Deprecated - public static final String PROFILE_KEY = "profile"; - /** - * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY} - */ - @Deprecated - public static final Metric<String> PROFILE = new Metric.Builder(PROFILE_KEY, "Profile", Metric.ValueType.DATA) - .setDescription("Selected quality profile") - .setDomain(DOMAIN_GENERAL) - .create(); - - /** - * @since 2.9 - * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY} - */ - @Deprecated - public static final String PROFILE_VERSION_KEY = "profile_version"; - /** - * @since 2.9 - * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY} - */ - @Deprecated - public static final Metric<Integer> PROFILE_VERSION = new Metric.Builder(PROFILE_VERSION_KEY, "Profile Version", Metric.ValueType.INT) - .setDescription("Selected quality profile version") - .setQualitative(false) - .setDomain(DOMAIN_GENERAL) - .setHidden(true) - .create(); - - /** * @since 4.4 * @deprecated since 5.5 */ diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java index 4d9bd1afed3..2fc3326f088 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java @@ -169,8 +169,8 @@ public class RangeDistributionBuilderTest { @Test public void aggregateEmptyDistribution() { - RangeDistributionBuilder builder = new RangeDistributionBuilder(CoreMetrics.LCOM4_DISTRIBUTION); - builder.add(new Measure(CoreMetrics.LCOM4_DISTRIBUTION, (String) null)); + RangeDistributionBuilder builder = new RangeDistributionBuilder(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); + builder.add(new Measure(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION, (String) null)); Measure distribution = builder.build(); assertThat(distribution.getData()).isEmpty(); } |