]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaw
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 3 Feb 2017 15:18:52 +0000 (16:18 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 3 Feb 2017 15:18:52 +0000 (16:18 +0100)
server/sonar-server/src/main/java/org/sonar/server/metric/ws/DeleteAction.java

index 9973cc534d366bfbb939655549dbcdc8dd953bbb..8babd2792d0ee1cc73cc88254b6f4eda8bd82dcf 100644 (file)
@@ -82,10 +82,10 @@ public class DeleteAction implements MetricsWsAction {
     List<String> idsAsStrings = request.paramAsStrings(PARAM_IDS);
     List<String> keys = request.paramAsStrings(PARAM_KEYS);
     checkArgument(idsAsStrings != null || keys != null, "Ids or keys must be provided.");
-    List<Integer> ids = null;
+    List<Integer> ids;
     if (idsAsStrings != null) {
       ids = Lists.transform(idsAsStrings, Integer::valueOf);
-    } else if (keys != null) {
+    } else {
       ids = Lists.transform(dbClient.metricDao().selectByKeys(dbSession, keys), MetricDto::getId);
     }