aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-03-12 08:25:20 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-03-12 08:25:20 +0100
commit659ff60252fcf0ca4f34bb69010be0043ef1c675 (patch)
tree5f57a5626d8c2c0fe4ba835f83bb9145b455de08 /sonar-plugin-api
parent260814641dc770baefbe787da616cfff9d16eb87 (diff)
downloadsonarqube-659ff60252fcf0ca4f34bb69010be0043ef1c675.tar.gz
sonarqube-659ff60252fcf0ca4f34bb69010be0043ef1c675.zip
SONAR-5056 Removed some useless usage of Requirement
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java6
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java
index 25d5a2c76fa..e2448adb5da 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java
@@ -652,7 +652,7 @@ public class Measure {
private static boolean isZeroVariation(Double... variations) {
for (Double variation : variations) {
- if (!((variation == null) || NumberUtils.compare(variation.doubleValue(), 0.0) == 0)) {
+ if (!((variation == null) || NumberUtils.compare(variation, 0.0) == 0)) {
return false;
}
}
@@ -684,9 +684,6 @@ public class Measure {
if (characteristic != null ? !characteristic.equals(measure.characteristic) : measure.characteristic != null) {
return false;
}
- if (requirement != null ? !requirement.equals(measure.requirement) : measure.requirement != null) {
- return false;
- }
if (personId != null ? !personId.equals(measure.personId) : measure.personId != null) {
return false;
}
@@ -697,7 +694,6 @@ public class Measure {
public int hashCode() {
int result = metricKey != null ? metricKey.hashCode() : 0;
result = 31 * result + (characteristic != null ? characteristic.hashCode() : 0);
- result = 31 * result + (requirement != null ? requirement.hashCode() : 0);
result = 31 * result + (personId != null ? personId.hashCode() : 0);
return result;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java
index 8c34e3ce176..2e5309e4673 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java
@@ -94,6 +94,10 @@ public final class MeasuresFilters {
measureCharacteristic.equals(characteristic);
}
+ /**
+ * @deprecated since 4.3
+ */
+ @Deprecated
public static MeasuresFilter<Measure> requirement(final Metric metric, final Requirement requirement) {
return new MetricFilter<Measure>(metric) {