aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-server-common')
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexer.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexer.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexer.java b/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexer.java
index 4a0334b9a65..2bd8b93c698 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexer.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexer.java
@@ -156,7 +156,7 @@ public class ComponentIndexer implements ProjectIndexer, NeedAuthorizationIndexe
bulk.stop();
}
- private void addProjectDeletionToBulkIndexer(BulkIndexer bulkIndexer, String projectUuid) {
+ private static void addProjectDeletionToBulkIndexer(BulkIndexer bulkIndexer, String projectUuid) {
SearchRequest searchRequest = EsClient.prepareSearch(TYPE_COMPONENT.getMainType())
.source(new SearchSourceBuilder().query(QueryBuilders.termQuery(ComponentIndexDefinition.FIELD_PROJECT_UUID, projectUuid)))
.routing(AuthorizationDoc.idOf(projectUuid));
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexer.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexer.java
index 6f63c457cbd..cdd09f7a9f3 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexer.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexer.java
@@ -261,14 +261,14 @@ public class IssueIndexer implements ProjectIndexer, NeedAuthorizationIndexer {
bulk.stop();
}
- private IndexRequest newIndexRequest(IssueDoc issue) {
+ private static IndexRequest newIndexRequest(IssueDoc issue) {
return new IndexRequest(TYPE_ISSUE.getMainType().getIndex().getName(), TYPE_ISSUE.getMainType().getType())
.id(issue.getId())
.routing(issue.getRouting().orElseThrow(() -> new IllegalStateException("IssueDoc should define a routing")))
.source(issue.getFields());
}
- private void addProjectDeletionToBulkIndexer(BulkIndexer bulkIndexer, String projectUuid) {
+ private static void addProjectDeletionToBulkIndexer(BulkIndexer bulkIndexer, String projectUuid) {
SearchRequest search = EsClient.prepareSearch(TYPE_ISSUE.getMainType())
.routing(AuthorizationDoc.idOf(projectUuid))
.source(new SearchSourceBuilder().query(boolQuery().must(termQuery(FIELD_ISSUE_PROJECT_UUID, projectUuid))));