diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-05-25 15:02:18 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-05-25 15:02:18 +0200 |
commit | a4c82a13a22292a0e96286937f31bd2866ed9e57 (patch) | |
tree | e45a6f692bcc5efc4a5d4fe9706b7118aa535626 /sonar-ws-client | |
parent | 44fdcdcd04ec07263b7992794b319314cab12154 (diff) | |
download | sonarqube-a4c82a13a22292a0e96286937f31bd2866ed9e57.tar.gz sonarqube-a4c82a13a22292a0e96286937f31bd2866ed9e57.zip |
SONAR-4353 drop the node 'id' from result
Diffstat (limited to 'sonar-ws-client')
4 files changed, 2 insertions, 13 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java index 485db0910a1..fbd41ac18b7 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java @@ -27,7 +27,6 @@ import java.util.Date; @Deprecated public class Violation extends Model { - private String id = null; private String message = null; private String severity = null; private Integer line = null; @@ -186,12 +185,4 @@ public class Violation extends Model { return switchedOff; } - public String getKey() { - return id; - } - - public Violation setKey(String id) { - this.id = id; - return this; - } } diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java index 25e5b5b585c..ea25de8c3d1 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java @@ -29,7 +29,6 @@ public class ViolationUnmarshaller extends AbstractUnmarshaller<Violation> { WSUtils utils = WSUtils.getINSTANCE(); Violation violation = new Violation(); - violation.setKey(utils.getString(json, "id")); violation.setMessage(utils.getString(json, "message")); violation.setLine(utils.getInteger(json, "line")); violation.setSeverity(utils.getString(json, "priority")); diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java index 1eccd7e3158..75485ae5444 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java @@ -47,7 +47,6 @@ public class ViolationUnmarshallerTest extends UnmarshallerTestCase { assertThat(violations.size(), is(2)); violation = violations.get(0); - assertThat(violation.getKey(), is("1")); assertThat(violation.getMessage(), is("throw java.lang.Exception")); assertThat(violation.hasLine(), is(true)); assertThat(violation.getLine(), is(97)); diff --git a/sonar-ws-client/src/test/resources/violations/violations.json b/sonar-ws-client/src/test/resources/violations/violations.json index 66353635fab..06c97eef38c 100644 --- a/sonar-ws-client/src/test/resources/violations/violations.json +++ b/sonar-ws-client/src/test/resources/violations/violations.json @@ -1,4 +1,4 @@ [ - {"id":1,"message":"throw java.lang.Exception","line":97,"createdAt":"2010-12-01T13:55:22+0300","priority":"MAJOR","rule":{"key":"pmd:SignatureDeclareThrowsException","name":"Signature Declare Throws Exception","category":"Maintainability"},"resource":{"key":"org.apache.excalibur.components:excalibur-pool-instrumented:org.apache.avalon.excalibur.pool.TraceableResourceLimitingPool","name":"TraceableResourceLimitingPool","scope":"FIL","qualifier":"CLA","language":"java"}}, - {"id":2,"message":"The user-supplied array 'threads' is stored directly.","line":242,"createdAt":"2010-12-01T13:55:22+0300","priority":"MAJOR","rule":{"key":"pmd:ArrayIsStoredDirectly","name":"Security - Array is stored directly","category":"Reliability"},"resource":{"key":"org.apache.excalibur.components:excalibur-pool-instrumented:org.apache.avalon.excalibur.pool.TraceableResourceLimitingPool","name":"TraceableResourceLimitingPool","scope":"FIL","qualifier":"CLA","language":"java"}} + {"message":"throw java.lang.Exception","line":97,"createdAt":"2010-12-01T13:55:22+0300","priority":"MAJOR","rule":{"key":"pmd:SignatureDeclareThrowsException","name":"Signature Declare Throws Exception","category":"Maintainability"},"resource":{"key":"org.apache.excalibur.components:excalibur-pool-instrumented:org.apache.avalon.excalibur.pool.TraceableResourceLimitingPool","name":"TraceableResourceLimitingPool","qualifier":"CLA"}}, + {"message":"The user-supplied array 'threads' is stored directly.","line":242,"createdAt":"2010-12-01T13:55:22+0300","priority":"MAJOR","rule":{"key":"pmd:ArrayIsStoredDirectly","name":"Security - Array is stored directly","category":"Reliability"},"resource":{"key":"org.apache.excalibur.components:excalibur-pool-instrumented:org.apache.avalon.excalibur.pool.TraceableResourceLimitingPool","name":"TraceableResourceLimitingPool","qualifier":"CLA"}} ]
\ No newline at end of file |