diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-04-23 00:00:36 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-04-23 19:23:31 +0200 |
commit | 5b0b77ac366811d1aa67e15adc10b09eb6351548 (patch) | |
tree | 810dd5f06c6c12a1bfbc0787e79b8beaad7d28a4 /server/sonar-ws-client/src | |
parent | 4cb7edb0029e605faf960d9d569341c10c4897b2 (diff) | |
download | sonarqube-5b0b77ac366811d1aa67e15adc10b09eb6351548.tar.gz sonarqube-5b0b77ac366811d1aa67e15adc10b09eb6351548.zip |
SONAR-6392 Drop measure trends
Diffstat (limited to 'server/sonar-ws-client/src')
4 files changed, 0 insertions, 70 deletions
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java index 3d40a55e9a5..434e5676cbb 100644 --- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java +++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java @@ -36,9 +36,6 @@ public class Measure extends Model { private String characteristicKey; private String characteristicName; - private Integer trend; - private Integer var; - private String ruleKey; private String ruleName; private String ruleSeverity; @@ -165,26 +162,6 @@ public class Measure extends Model { } @CheckForNull - public Integer getTrend() { - return trend; - } - - public Measure setTrend(@Nullable Integer trend) { - this.trend = trend; - return this; - } - - @CheckForNull - public Integer getVar() { - return var; - } - - public Measure setVar(@Nullable Integer var) { - this.var = var; - return this; - } - - @CheckForNull public String getRuleKey() { return ruleKey; } @@ -371,7 +348,6 @@ public class Measure extends Model { .append(", data='").append(data).append('\'') .append(", characteristicKey='").append(characteristicKey).append('\'') .append(", characteristicName='").append(characteristicName).append('\'') - .append(", trend=").append(trend).append(", var=").append(var) .append(", ruleKey='").append(ruleKey).append('\'') .append(", ruleName='").append(ruleName).append('\'') .append(", ruleCategory='").append(ruleCategory).append('\'') diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java index e216ced6137..c4cbdb64d29 100644 --- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java +++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java @@ -100,8 +100,6 @@ public class ResourceUnmarshaller extends AbstractUnmarshaller<Resource> { .setFormattedValue(utils.getString(json, "frmt_val")) .setAlertStatus(utils.getString(json, "alert")) .setAlertText(utils.getString(json, "alert_text")) - .setTrend(utils.getInteger(json, "trend")) - .setVar(utils.getInteger(json, "var")) .setData(utils.getString(json, "data")) .setRuleKey(utils.getString(json, "rule_key")) .setRuleName(utils.getString(json, "rule_name")) diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java index cc2f1f64faf..271ad82ec96 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java @@ -53,20 +53,6 @@ public class ResourceUnmarshallerTest extends UnmarshallerTestCase { } @Test - public void singleResourceWithTrends() { - Resource resource = new ResourceUnmarshaller().toModel(loadFile("/resources/single-resource-with-trends.json")); - assertSonar(resource); - - assertThat(resource.getMeasures().size(), is(2)); - assertThat(resource.getMeasureIntValue("lines"), is(47798)); - assertThat(resource.getMeasureIntValue("ncloc"), is(27066)); - assertThat(resource.getMeasure("lines").getTrend(), is(0)); - assertThat(resource.getMeasure("lines").getVar(), is(2)); - assertThat(resource.getMeasure("ncloc").getTrend(), is(1)); - assertThat(resource.getMeasure("ncloc").getVar(), is(1)); - } - - @Test public void manyResources() { List<Resource> resources = new ResourceUnmarshaller().toModels(loadFile("/resources/many-resources.json")); diff --git a/server/sonar-ws-client/src/test/resources/resources/single-resource-with-trends.json b/server/sonar-ws-client/src/test/resources/resources/single-resource-with-trends.json deleted file mode 100644 index a29048a2fd5..00000000000 --- a/server/sonar-ws-client/src/test/resources/resources/single-resource-with-trends.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "id":48569, - "key":"org.codehaus.sonar:sonar", - "name":"Sonar", - "scope":"PRJ", - "qualifier":"TRK", - "date":"2010-01-01T22:27:25+0000", - "creationDate":"2009-01-01T22:27:25+0000", - "lang":"java", - "version":"1.13-SNAPSHOT", - "description":"Embrace Quality", - "msr":[ - { - "key":"lines", - "val":47798.0, - "frmt_val":"47,798", - "trend":0, - "var":2 - }, - { - "key":"ncloc", - "val":27066.0, - "frmt_val":"27,066", - "trend":1, - "var":1 - } - ] - } -]
\ No newline at end of file |