From: Simon Brandhof Date: Tue, 16 May 2017 08:39:14 +0000 (+0200) Subject: Fix Quality flaws X-Git-Tag: 6.4-RC1~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1271c3adf0c522c18053b4de3c22cf8c8cee777e;p=sonarqube.git Fix Quality flaws --- 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; }