From 9cf5cda493fd172bb7866082417aababe1bc3f73 Mon Sep 17 00:00:00 2001 From: Jacek Date: Thu, 11 Feb 2021 09:52:13 +0100 Subject: [PATCH] SONAR-14455 Upgrade Elasticsearch client dependencies to 7.10.2 --- build.gradle | 6 +++--- .../main/java/org/sonar/server/issue/index/IssueIndex.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 09f6c81fc79..4c1a4b79624 100644 --- a/build.gradle +++ b/build.gradle @@ -348,12 +348,12 @@ subprojects { entry 'jetty-server' entry 'jetty-servlet' } - dependency('org.elasticsearch.client:elasticsearch-rest-high-level-client:7.9.3') { + dependency('org.elasticsearch.client:elasticsearch-rest-high-level-client:7.10.2') { exclude 'commons-logging:commons-logging' } - dependency 'org.elasticsearch.plugin:transport-netty4-client:7.9.3' + dependency 'org.elasticsearch.plugin:transport-netty4-client:7.10.2' dependency 'org.elasticsearch:mocksocket:1.0' - dependency 'org.codelibs.elasticsearch.module:analysis-common:7.9.3' + dependency 'org.codelibs.elasticsearch.module:analysis-common:7.10.2' dependency 'org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r' dependency 'org.tmatesoft.svnkit:svnkit:1.10.1' dependency 'org.hamcrest:hamcrest-all:1.3' diff --git a/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java index 77c7eaf3517..6ffa2356051 100644 --- a/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -52,7 +52,7 @@ import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation; import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilter; import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.ExtendedBounds; +import org.elasticsearch.search.aggregations.bucket.histogram.LongBounds; import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms; import org.elasticsearch.search.aggregations.bucket.terms.Terms; @@ -808,7 +808,7 @@ public class IssueIndex { .format(DateUtils.DATETIME_FORMAT) .timeZone(Optional.ofNullable(query.timeZone()).orElse(system.getDefaultTimeZone().toZoneId())) // ES dateHistogram bounds are inclusive while createdBefore parameter is exclusive - .extendedBounds(new ExtendedBounds(startInclusive ? startTime : (startTime + 1), endTime - 1L)); + .extendedBounds(new LongBounds(startInclusive ? startTime : (startTime + 1), endTime - 1L)); addEffortAggregationIfNeeded(query, dateHistogram); t.subAggregation(dateHistogram); }); -- 2.39.5