aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-09-03 18:02:01 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-09-07 17:56:16 +0200
commitd6b98c8df426ee430eb6397c550b04f0ac5ba96d (patch)
treed92e40fa2064910655fb525cdab87d20318e16f3 /sonar-db
parente08d53bde12c408225e4ac5a3702856a98d8af1e (diff)
downloadsonarqube-d6b98c8df426ee430eb6397c550b04f0ac5ba96d.tar.gz
sonarqube-d6b98c8df426ee430eb6397c550b04f0ac5ba96d.zip
Remove useless MeasureDto.componentKey
Diffstat (limited to 'sonar-db')
-rw-r--r--sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java11
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml1
-rw-r--r--sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java3
-rw-r--r--sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java1
4 files changed, 0 insertions, 16 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java b/sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java
index 0ba16182f0e..986f5d6d588 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java
+++ b/sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java
@@ -51,7 +51,6 @@ public class MeasureDto {
// TODO to delete – not in db
private String metricKey;
- private String componentKey;
public Long getId() {
return id;
@@ -231,15 +230,6 @@ public class MeasureDto {
return this;
}
- public String getComponentKey() {
- return componentKey;
- }
-
- public MeasureDto setComponentKey(String componentKey) {
- this.componentKey = componentKey;
- return this;
- }
-
@Override
public String toString() {
return Objects.toStringHelper(this)
@@ -262,7 +252,6 @@ public class MeasureDto {
.add("characteristicId", characteristicId)
.add("personId", personId)
.add("metricKey", metricKey)
- .add("componentKey", componentKey)
.toString();
}
}
diff --git a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml b/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
index 69ca00c72c2..d2439310131 100644
--- a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
+++ b/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
@@ -20,7 +20,6 @@
<sql id="extendedMeasureColumns">
<include refid="measureColumns"/>,
- p.kee as componentKey,
metric.name as metricKey
</sql>
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
index 1b7d7e4121e..8f487d8fc56 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
@@ -97,7 +97,6 @@ public class MeasureDaoTest {
MeasureDto result = results.get(0);
assertThat(result.getId()).isEqualTo(22);
assertThat(result.getValue()).isEqualTo(10d);
- assertThat(result.getComponentKey()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
assertThat(result.getMetricKey()).isEqualTo("ncloc");
assertThat(result.getVariation(1)).isEqualTo(1d);
assertThat(result.getVariation(2)).isEqualTo(2d);
@@ -126,7 +125,6 @@ public class MeasureDaoTest {
assertThat(result.getMetricId()).isEqualTo(12);
assertThat(result.getMetricKey()).isNull();
assertThat(result.getValue()).isEqualTo(10d);
- assertThat(result.getComponentKey()).isNull();
assertThat(result.getVariation(1)).isEqualTo(1d);
assertThat(result.getVariation(2)).isEqualTo(2d);
assertThat(result.getVariation(3)).isEqualTo(3d);
@@ -142,7 +140,6 @@ public class MeasureDaoTest {
assertThat(result.getId()).isEqualTo(22);
assertThat(result.getValue()).isEqualTo(10d);
assertThat(result.getMetricKey()).isEqualTo("ncloc");
- assertThat(result.getComponentKey()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
assertThat(result.getVariation(1)).isEqualTo(1d);
assertThat(result.getVariation(2)).isEqualTo(2d);
assertThat(result.getVariation(3)).isEqualTo(3d);
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java
index fb80a71d966..b644064938b 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java
@@ -32,7 +32,6 @@ public class MeasureDtoTest {
@Test
public void test_getter_and_setter() throws Exception {
underTest
- .setComponentKey("component")
.setMetricKey("metric")
.setId(10L)
.setValue(2d)