]> source.dussan.org Git - sonarqube.git/commitdiff
Add helper to filter measures by rule key
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 28 Aug 2014 07:19:13 +0000 (09:19 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 28 Aug 2014 08:26:18 +0000 (10:26 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java

index 15812bbafe9abd4a1bad9d22eb4b5805cccb1a82..ef79ca10051ebbda4cde7f3bbb4faa4bb515c4bb 100644 (file)
@@ -153,8 +153,12 @@ public final class MeasuresFilters {
     };
   }
 
+  public static MeasuresFilter<RuleMeasure> rule(final Metric metric, final RuleKey ruleKey) {
+    return new RuleFilter(metric, ruleKey);
+  }
+
   public static MeasuresFilter<RuleMeasure> rule(final Metric metric, final Rule rule) {
-    return new RuleFilter(metric, rule.ruleKey());
+    return rule(metric, rule.ruleKey());
   }
 
   public static MeasuresFilter<Collection<RuleMeasure>> rules(final Metric metric) {