Skip to content

Commit

Permalink
solved compilation problems
Browse files Browse the repository at this point in the history
  • Loading branch information
JUAN SALVADOR ALEIXANDRE TALENS committed Feb 1, 2024
1 parent f148b0d commit 4e32f4e
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
Expand All @@ -22,6 +23,7 @@
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonarqube.ws.Components;
import org.sonarqube.ws.Components.SearchWsResponse;
import org.sonarqube.ws.Measures;
import org.sonarqube.ws.client.WsClient;
import org.sonarqube.ws.client.WsClientFactories;
Expand Down Expand Up @@ -312,12 +314,12 @@ private List<Components.Component> getProjects(WsClient wsClient) {
boolean hasMore = true;

while (hasMore) {
SearchResponse searchResponse = wsClient.components().search(new SearchRequest()
.setQualifiers(Collections.singletonList(Qualifiers.PROJECT))
.setPs(500)
.setP(pageIndex));
SearchWsResponse searchResponse = wsClient.components()
.search(new SearchRequest().setQualifiers(Collections.singletonList(Qualifiers.PROJECT))
.setPs(String.valueOf(500)).setP(String.valueOf(pageIndex)));
projects.addAll(searchResponse.getComponentsList());
hasMore = searchResponse.getPaging().getPageIndex() * searchResponse.getPaging().getPageSize() < searchResponse.getPaging().getTotal();
hasMore = searchResponse.getPaging().getPageIndex() * searchResponse.getPaging().getPageSize() < searchResponse
.getPaging().getTotal();
pageIndex++;
}

Expand Down

0 comments on commit 4e32f4e

Please sign in to comment.