aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-client')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java2
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&"));
}
}