summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java5
1 files changed, 3 insertions, 2 deletions
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 3b964a214e1..d42f3c329f3 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
@@ -76,11 +76,12 @@ public final class MeasuresFilters {
return null;
}
for (Measure measure : measures) {
+ Characteristic measureCharacteristic = measure.getCharacteristic();
if (measure.getClass().equals(Measure.class) &&
measure.getMetric().equals(metric) &&
measure.getPersonId() == null &&
- measure.getCharacteristic() != null &&
- measure.getCharacteristic().equals(characteristic)) {
+ measureCharacteristic != null &&
+ measureCharacteristic.equals(characteristic)) {
return measure;
}
}