diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-02-09 14:23:56 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-02-09 14:52:23 +0100 |
commit | 2e0239d5170db953f631fa4a443b2025f8d3fe5b (patch) | |
tree | 7de5cf7d9d9aef42405bc0fbe36f74aea428ca87 /server/sonar-ws-client | |
parent | f32ae830af90b130ea73c66cd2a0b3a39f876afd (diff) | |
download | sonarqube-2e0239d5170db953f631fa4a443b2025f8d3fe5b.tar.gz sonarqube-2e0239d5170db953f631fa4a443b2025f8d3fe5b.zip |
Fix SearchOptions#setPage(int page, int pageSize) when pageSize is zero
Diffstat (limited to 'server/sonar-ws-client')
4 files changed, 5 insertions, 21 deletions
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java index 702b83760ae..a3baba1b8ce 100644 --- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java +++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java @@ -69,6 +69,4 @@ public interface Issues { Paging paging(); - Boolean maxResultsReached(); - } diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java index cfacd6111a0..5f89a1a32bd 100644 --- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java +++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java @@ -28,9 +28,11 @@ import org.sonar.wsclient.rule.Rule; import org.sonar.wsclient.user.User; import javax.annotation.CheckForNull; -import javax.annotation.Nullable; - -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * @since 3.6 @@ -45,7 +47,6 @@ public class DefaultIssues implements Issues { private final Map<String, Component> projectsByKey = new HashMap<String, Component>(); private final Map<String, ActionPlan> actionPlansByKey = new HashMap<String, ActionPlan>(); private Paging paging; - private Boolean maxResultsReached; @Override public List<Issue> list() { @@ -128,12 +129,6 @@ public class DefaultIssues implements Issues { return paging; } - @Override - @Nullable - public Boolean maxResultsReached() { - return maxResultsReached; - } - DefaultIssues add(Issue issue) { list.add(issue); return this; @@ -169,9 +164,4 @@ public class DefaultIssues implements Issues { this.paging = paging; return this; } - - DefaultIssues setMaxResultsReached(@Nullable Boolean maxResultsReached) { - this.maxResultsReached = maxResultsReached; - return this; - } } diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/IssueJsonParser.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/IssueJsonParser.java index 40608c48e7d..02cad915e57 100644 --- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/IssueJsonParser.java +++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/IssueJsonParser.java @@ -63,7 +63,6 @@ public class IssueJsonParser { private void parsePaging(DefaultIssues result, Map jsonRoot) { Map paging = (Map) jsonRoot.get("paging"); result.setPaging(new Paging(paging)); - result.setMaxResultsReached(JsonUtils.getBoolean(jsonRoot, "maxResultsReached")); } private void parseProjects(DefaultIssues result, Map jsonRoot) { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java index c4db8a6f4e5..49295988c6a 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java @@ -84,8 +84,6 @@ public class IssueJsonParserTest { assertThat(paging.pageSize()).isEqualTo(100); assertThat(paging.pages()).isEqualTo(1); assertThat(paging.total()).isEqualTo(2); - - assertThat(issues.maxResultsReached()).isTrue(); } @Test @@ -95,7 +93,6 @@ public class IssueJsonParserTest { assertThat(issues).isNotNull(); assertThat(issues.list()).isEmpty(); assertThat(issues.rules()).isEmpty(); - assertThat(issues.maxResultsReached()).isFalse(); } @Test |