]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8467 Fix ProjectAnalysisService#search
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 23 Jan 2017 09:40:58 +0000 (10:40 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 24 Jan 2017 17:36:48 +0000 (18:36 +0100)
sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalysis/ProjectAnalysisService.java

index a760ac3a130f064e68001fa31186a9db37c4c090..411d214ef4693b9cf063b500ec6facfb1196987a 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.sonarqube.ws.client.projectanalysis;
 
-import org.sonarqube.ws.ProjectAnalyses;
+import org.sonarqube.ws.ProjectAnalyses.SearchResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsConnector;
@@ -36,14 +36,14 @@ public class ProjectAnalysisService extends BaseService {
     super(wsConnector, "api/project_analyses");
   }
 
-  public void search(SearchRequest searchRequest) {
+  public SearchResponse search(SearchRequest searchRequest) {
     EventCategory eventCategory = searchRequest.getCategory();
     GetRequest request = new GetRequest(path("search"))
       .setParam(PARAM_PROJECT, searchRequest.getProject())
       .setParam(PARAM_CATEGORY, eventCategory == null ? null : eventCategory.name())
       .setParam(PAGE, searchRequest.getPage())
       .setParam(PAGE_SIZE, searchRequest.getPageSize());
-    call(request, ProjectAnalyses.SearchResponse.parser());
+    return call(request, SearchResponse.parser());
   }
 
 }