aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-07-24 10:01:58 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-07-24 10:02:08 +0200
commit3d5c0f21706bd44755de23ead87e833f2a12db6f (patch)
treeb6ed44b1a6bfedeff347987c55406a6e8bd5108e /sonar-plugin-api
parentc31cbfe24543d7e7e35380ef941e92cef9aac77c (diff)
downloadsonarqube-3d5c0f21706bd44755de23ead87e833f2a12db6f.tar.gz
sonarqube-3d5c0f21706bd44755de23ead87e833f2a12db6f.zip
Add @deprecated and all formulas api and remove some decorator usage in test
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageFormula.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java2
6 files changed, 14 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java
index 0a933ad0f09..964d8a3f8b8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java
@@ -19,19 +19,20 @@
*/
package org.sonar.api.batch;
+import java.util.List;
import org.sonar.api.measures.Measure;
import org.sonar.api.measures.MeasureUtils;
import org.sonar.api.measures.Metric;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
-import java.util.List;
-
/**
* Sum measures of child resources.
*
* @since 1.10
+ * @deprecated since 5.2 there's no more decorator on batch side
*/
+@Deprecated
public abstract class AbstractSumChildrenDecorator implements Decorator {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageFormula.java
index 976508710d6..f029f438918 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageFormula.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageFormula.java
@@ -31,7 +31,9 @@ import static com.google.common.collect.Lists.newArrayList;
* For example: to compute the metric "complexity by file", the main metric (A) is "complexity" and the other metric (B) is "file".
*
* @since 3.0
+ * @deprecated since 5.2 decorators are no more executed on batch side
*/
+@Deprecated
public class AverageFormula implements Formula {
private Metric mainMetric;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java
index ec65d5a730f..f66bf51009d 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java
@@ -25,7 +25,9 @@ import java.util.List;
/**
* @since 2.0
+ * @deprecated since 5.2 decorators are no more executed on batch side
*/
+@Deprecated
public class MeanAggregationFormula implements Formula {
private boolean forceZeroIfMissingData=false;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java
index f00edfad56f..e75a2f3c119 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java
@@ -19,17 +19,18 @@
*/
package org.sonar.api.measures;
-import org.sonar.api.resources.Scopes;
-
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import org.sonar.api.resources.Scopes;
/**
* @since 2.0
*
* Used to consolidate a distribution measure throughout the resource tree
+ * @deprecated since 5.2 decorators are no more executed on batch side
*/
+@Deprecated
public class SumChildDistributionFormula implements Formula {
private String minimumScopeToPersist= Scopes.FILE;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java
index a81d7e0bac4..37e7abf6a25 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java
@@ -24,7 +24,9 @@ import java.util.List;
/**
* @since 1.11
+ * @deprecated since 5.2 decorators are no more executed on batch side
*/
+@Deprecated
public class SumChildValuesFormula implements Formula {
private boolean saveZeroIfNoChildValues;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java
index fc8900d8a94..7be604edaf6 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java
@@ -24,7 +24,9 @@ import java.util.List;
/**
* @since 2.0
+ * @deprecated since 5.2 decorators are no more executed on batch side
*/
+@Deprecated
public class WeightedMeanAggregationFormula implements Formula {
private Metric weightingMetric;