diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2020-04-27 12:42:10 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-05-25 20:05:20 +0000 |
commit | 6b41a01454b98c413889dc2400a9cddb3b390847 (patch) | |
tree | 6ccca99e10d77b453abc252835d6c70cfdb41d6c /sonar-scanner-engine/src | |
parent | 65e12a8ca01341c1ad00809d807bb8db0f5bf4b2 (diff) | |
download | sonarqube-6b41a01454b98c413889dc2400a9cddb3b390847.tar.gz sonarqube-6b41a01454b98c413889dc2400a9cddb3b390847.zip |
SONAR-13221 Metrics
Diffstat (limited to 'sonar-scanner-engine/src')
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; |