From 1271c3adf0c522c18053b4de3c22cf8c8cee777e Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 16 May 2017 10:39:14 +0200 Subject: [PATCH] Fix Quality flaws --- .../java/org/sonar/api/measures/MeasuresFilters.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 cf60645abf5..7049e46d852 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 @@ -22,6 +22,7 @@ package org.sonar.api.measures; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import javax.annotation.Nullable; import org.sonar.api.rule.RuleKey; import org.sonar.api.rules.Rule; @@ -57,7 +58,7 @@ public final class MeasuresFilters { public static MeasuresFilter metric(final String metricKey) { return new MetricFilter(metricKey) { @Override - public Measure filter(Collection measures) { + public Measure filter(@Nullable Collection measures) { if (measures == null) { return null; } @@ -79,7 +80,7 @@ public final class MeasuresFilters { public static MeasuresFilter measure(final Measure measure) { return new MeasuresFilter() { @Override - public Measure filter(Collection measures) { + public Measure filter(@Nullable Collection measures) { if (measures == null) { return null; } @@ -110,7 +111,7 @@ public final class MeasuresFilters { } @Override - public Collection filter(Collection measures) { + public Collection filter(@Nullable Collection measures) { if (measures == null) { return null; } @@ -163,7 +164,7 @@ public final class MeasuresFilters { abstract boolean doApply(RuleMeasure ruleMeasure); @Override - public M filter(Collection measures) { + public M filter(@Nullable Collection measures) { if (measures == null) { return null; } -- 2.39.5