diff options
author | Godin <mandrikov@gmail.com> | 2010-09-15 15:06:36 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-09-15 15:06:36 +0000 |
commit | 739c60296c0abc6e258cb77e1576715437e611fe (patch) | |
tree | abb631a3a7fcc6de5c32890c811d45c3800bb5f0 /sonar-ws-client | |
parent | 83a555da8548a0b4e22874e8a11f91ce9cdabbe6 (diff) | |
download | sonarqube-739c60296c0abc6e258cb77e1576715437e611fe.tar.gz sonarqube-739c60296c0abc6e258cb77e1576715437e611fe.zip |
SONAR-1793: Fix wrong URL construction in ViolationQuery, when depth parameter used
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java | 2 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java index 9cfddcfb3b4..67bc4409546 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java @@ -96,7 +96,7 @@ public class ViolationQuery extends Query<Violation> { .append("&"); if (depth != 0) { - url.append("depth").append(depth).append("&"); + url.append("depth=").append(depth).append("&"); } append(url, "scopes", scopes); append(url, "qualifiers", qualifiers); diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java index a90b04d70b0..57e97f9ed46 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java @@ -41,6 +41,6 @@ public class ViolationQueryTest { .setPriorities("MAJOR", "BLOCKER") .setQualifiers("FIL") .setRuleKeys("checkstyle:foo", "pmd:bar"); - assertThat(query.getUrl(), is("/api/violations?resource=myproject&depth-1&qualifiers=FIL&rules=checkstyle:foo,pmd:bar&priorities=MAJOR,BLOCKER&")); + assertThat(query.getUrl(), is("/api/violations?resource=myproject&depth=-1&qualifiers=FIL&rules=checkstyle:foo,pmd:bar&priorities=MAJOR,BLOCKER&")); } } |