aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java8
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java
index 02bbdf02e92..f5abad5bb9a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java
@@ -63,7 +63,7 @@ public class DefaultMetricsRepositoryLoader implements MetricsRepositoryLoader {
.setQualitative(metric.isQualitative())
.setUserManaged(metric.isCustom())
.setDescription(metric.getDescription())
- .setId(metric.getId()));
+ .setUuid(metric.getUuid()));
}
}
page++;
@@ -71,7 +71,7 @@ public class DefaultMetricsRepositoryLoader implements MetricsRepositoryLoader {
}
private static class WsMetric {
- private int id;
+ private String uuid;
private String key;
private String type;
private String name;
@@ -80,8 +80,8 @@ public class DefaultMetricsRepositoryLoader implements MetricsRepositoryLoader {
private boolean qualitative;
private boolean custom;
- public int getId() {
- return id;
+ public String getUuid() {
+ return uuid;
}
public String getKey() {
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
index 6e4aad7c736..a3a1024621d 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
@@ -354,7 +354,7 @@ public class ScannerMediumTester extends ExternalResource {
}
public FakeMetricsRepositoryLoader add(Metric<?> metric) {
- metric.setId(metricId++);
+ metric.setUuid("metric" + metricId++);
metrics.add(metric);
metricId++;
return this;