aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorRuben Dijkstra <rubendijkstra123@gmail.com>2016-01-02 15:43:25 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-01-04 15:23:07 +0100
commitb182a2db0aa5e8027e2f411b61636c8a2d5ed5c3 (patch)
treeaa7fd4d9947e66c6e93c5b4bad564abc872d0b65 /server
parentbd0f794ad863cc9e0685b911c5ca93104c69f774 (diff)
downloadsonarqube-b182a2db0aa5e8027e2f411b61636c8a2d5ed5c3.tar.gz
sonarqube-b182a2db0aa5e8027e2f411b61636c8a2d5ed5c3.zip
Fix Map.containsKey call that would never return true
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/metric/MetricRepositoryRule.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/metric/MetricRepositoryRule.java b/server/sonar-server/src/test/java/org/sonar/server/computation/metric/MetricRepositoryRule.java
index 2b51faf2c01..7d332f1a302 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/metric/MetricRepositoryRule.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/metric/MetricRepositoryRule.java
@@ -75,7 +75,7 @@ public class MetricRepositoryRule extends ExternalResource implements MetricRepo
requireNonNull(metric.getId(), "id can not be null");
checkState(!metricsByKey.containsKey(metric.getKey()), format("Repository already contains a metric for key %s", metric.getKey()));
- checkState(!metricsById.containsKey(metric.getId()), format("Repository already contains a metric for id %s", metric.getId()));
+ checkState(!metricsById.containsKey((long) metric.getId()), format("Repository already contains a metric for id %s", metric.getId()));
metricsByKey.put(metric.getKey(), metric);
metricsById.put((long) metric.getId(), metric);