Просмотр исходного кода

SONAR-1793: Fix wrong URL construction in ViolationQuery, when depth parameter used

tags/2.6
Godin 13 лет назад
Родитель
Сommit
739c60296c

+ 1
- 1
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);

+ 1
- 1
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&"));
}
}

Загрузка…
Отмена
Сохранить