aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-11-13 15:06:10 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-11-17 13:41:04 +0100
commit0444203efdb03f630a7912bc62bab892cbd9bbdc (patch)
treee2caa558a23b2bf62d87f051af459ea54421df91 /sonar-batch
parent40cf347e9aa2ded35a8798b8aec0abbf2e993183 (diff)
downloadsonarqube-0444203efdb03f630a7912bc62bab892cbd9bbdc.tar.gz
sonarqube-0444203efdb03f630a7912bc62bab892cbd9bbdc.zip
SONAR-6947 api/qualityprofiles/search use SearchWsRequest
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizer.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/cache/ProjectCacheSynchronizer.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/repository/DefaultQualityProfileLoader.java8
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileLoader.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileProvider.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizerTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/mediumtest/BatchMediumTester.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/repository/DefaultQualityProfileLoaderTest.java6
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/repository/QualityProfileProviderTest.java4
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java2
12 files changed, 17 insertions, 19 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizer.java b/sonar-batch/src/main/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizer.java
index b9ec4f0b503..f5cc9a540e6 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizer.java
@@ -30,7 +30,7 @@ import org.sonar.api.utils.log.Profiler;
import org.sonar.batch.repository.QualityProfileLoader;
import org.sonar.batch.rule.ActiveRulesLoader;
import org.sonar.batch.rule.RulesLoader;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
public class NonAssociatedCacheSynchronizer {
private static final Logger LOG = LoggerFactory.getLogger(NonAssociatedCacheSynchronizer.class);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/cache/ProjectCacheSynchronizer.java b/sonar-batch/src/main/java/org/sonar/batch/cache/ProjectCacheSynchronizer.java
index 9ff8b6bb4ed..b29acea469a 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/cache/ProjectCacheSynchronizer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/cache/ProjectCacheSynchronizer.java
@@ -40,7 +40,7 @@ import org.sonar.batch.repository.ServerIssuesLoader;
import org.sonar.batch.repository.user.UserRepositoryLoader;
import org.sonar.batch.rule.ActiveRulesLoader;
import org.sonar.batch.rule.RulesLoader;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
public class ProjectCacheSynchronizer {
private static final Logger LOG = LoggerFactory.getLogger(ProjectCacheSynchronizer.class);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultQualityProfileLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultQualityProfileLoader.java
index c8cc3f391cf..bd382543e52 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultQualityProfileLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultQualityProfileLoader.java
@@ -19,11 +19,11 @@
*/
package org.sonar.batch.repository;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
import org.sonar.batch.util.BatchUtils;
import org.apache.commons.io.IOUtils;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import org.apache.commons.lang.mutable.MutableBoolean;
import org.sonar.batch.cache.WSLoaderResult;
import org.sonar.batch.cache.WSLoader;
@@ -74,10 +74,10 @@ public class DefaultQualityProfileLoader implements QualityProfileLoader {
fromCache.setValue(result.isFromCache());
}
InputStream is = result.get();
- WsSearchResponse profiles = null;
+ SearchWsResponse profiles = null;
try {
- profiles = WsSearchResponse.parseFrom(is);
+ profiles = SearchWsResponse.parseFrom(is);
} catch (IOException e) {
throw new IllegalStateException("Failed to load quality profiles", e);
} finally {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileLoader.java
index 266d24a3d7a..8ca2f6b5020 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileLoader.java
@@ -20,7 +20,7 @@
package org.sonar.batch.repository;
import org.apache.commons.lang.mutable.MutableBoolean;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import javax.annotation.Nullable;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileProvider.java b/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileProvider.java
index b53635e7bd5..e3de47efb81 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileProvider.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/repository/QualityProfileProvider.java
@@ -25,7 +25,7 @@ import org.sonar.api.utils.log.Profiler;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.apache.commons.lang.mutable.MutableBoolean;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import org.sonar.batch.analysis.DefaultAnalysisMode;
import org.sonar.api.batch.bootstrap.ProjectKey;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java b/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java
index 3f8d5cdd8ae..9321ddd357e 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java
@@ -21,7 +21,7 @@ package org.sonar.batch.rule;
import org.sonar.api.utils.DateUtils;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import com.google.common.collect.ImmutableMap;
import org.sonar.api.batch.BatchSide;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizerTest.java b/sonar-batch/src/test/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizerTest.java
index 6bbde374460..dd3ce4f5598 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/cache/NonAssociatedCacheSynchronizerTest.java
@@ -29,7 +29,7 @@ import org.sonar.batch.repository.QualityProfileLoader;
import org.sonar.batch.rule.ActiveRulesLoader;
import org.sonar.batch.rule.LoadedActiveRule;
import org.sonar.batch.rule.RulesLoader;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java b/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java
index fabfe251eee..e2de472f795 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java
@@ -46,7 +46,7 @@ import org.sonar.batch.rule.ActiveRulesLoader;
import org.sonar.batch.rule.DefaultActiveRulesLoader;
import org.sonar.batch.rule.LoadedActiveRule;
import org.sonar.batch.rule.RulesLoader;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/BatchMediumTester.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/BatchMediumTester.java
index c330d304a8e..8245af78c82 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/BatchMediumTester.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/BatchMediumTester.java
@@ -28,7 +28,7 @@ import com.google.common.collect.Table;
import com.google.common.collect.HashBasedTable;
import org.sonar.batch.repository.ProjectRepositories;
import org.sonar.batch.rule.ActiveRulesLoader;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import org.sonar.batch.repository.QualityProfileLoader;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.mutable.MutableBoolean;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultQualityProfileLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultQualityProfileLoaderTest.java
index f0215aa18e2..b3c2b79dcb3 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultQualityProfileLoaderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultQualityProfileLoaderTest.java
@@ -19,10 +19,10 @@
*/
package org.sonar.batch.repository;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse;
+import org.sonarqube.ws.QualityProfiles;
import com.google.common.io.Resources;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import org.sonar.batch.cache.WSLoaderResult;
import org.sonar.batch.cache.WSLoader;
import org.junit.Rule;
@@ -102,7 +102,7 @@ public class DefaultQualityProfileLoaderTest {
private static InputStream createEncodedQP(String... names) throws IOException {
ByteArrayOutputStream os = new ByteArrayOutputStream();
- WsSearchResponse.Builder responseBuilder = WsSearchResponse.newBuilder();
+ QualityProfiles.SearchWsResponse.Builder responseBuilder = QualityProfiles.SearchWsResponse.newBuilder();
for (String n : names) {
QualityProfile qp = QualityProfile.newBuilder().setKey(n).setName(n).setLanguage("lang").build();
diff --git a/sonar-batch/src/test/java/org/sonar/batch/repository/QualityProfileProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/repository/QualityProfileProviderTest.java
index 799022ecbe3..567dcd1380d 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/repository/QualityProfileProviderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/repository/QualityProfileProviderTest.java
@@ -21,12 +21,10 @@ package org.sonar.batch.repository;
import static org.mockito.Mockito.when;
-import org.mockito.Matchers;
-
import org.apache.commons.lang.mutable.MutableBoolean;
import org.sonar.api.batch.bootstrap.ProjectKey;
import org.sonar.batch.analysis.DefaultAnalysisMode;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import java.util.ArrayList;
import java.util.List;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java
index 8a18f87a51d..3df796e805b 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java
@@ -29,7 +29,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonar.api.batch.rule.ActiveRules;
import org.sonar.api.rule.RuleKey;
-import org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;