diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2020-12-04 12:10:10 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-12-09 20:07:21 +0000 |
commit | d4a6de2b1520c99bba1d4d97c70a904498baf43b (patch) | |
tree | d4ba1d67ebcc27a548ba0e8b5c7ba99f5e29ec46 /server/sonar-server-common | |
parent | e2ec80f28723ad04d3be47da4e76cc10716a3526 (diff) | |
download | sonarqube-d4a6de2b1520c99bba1d4d97c70a904498baf43b.tar.gz sonarqube-d4a6de2b1520c99bba1d4d97c70a904498baf43b.zip |
Fix various code smells
Diffstat (limited to 'server/sonar-server-common')
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)))); |