From 93acff230264a4d50efc63e1ced54212a79e9070 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 12 May 2016 17:56:49 +0200 Subject: [PATCH] Sanitize package org.sonar.server.search Keep only deprecated classes in package org.sonar.server.search. Valid classes are moved to org.sonar.server.es. --- .../ce/container/ComputeEngineContainerImpl.java | 2 +- .../java/org/sonar/ce/es/EsIndexerEnabler.java | 3 ++- .../sonar/server/activity/index/ActivityDoc.java | 10 ++++------ .../org/sonar/server/{search => es}/BaseDoc.java | 8 ++++---- .../main/java/org/sonar/server/es/BaseIndexer.java | 7 +++---- .../src/main/java/org/sonar/server/es/EsUtils.java | 1 - .../IndexerStartupTask.java} | 8 ++++---- .../java/org/sonar/server/es/SearchResult.java | 6 ++---- .../server/{search => es}/StickyFacetBuilder.java | 2 +- .../org/sonar/server/issue/index/IssueDoc.java | 2 +- .../org/sonar/server/issue/index/IssueIndex.java | 2 +- .../platformlevel/PlatformLevelStartup.java | 6 +++--- .../server/qualityprofile/index/ActiveRuleDoc.java | 2 +- .../java/org/sonar/server/rule/index/RuleDoc.java | 2 +- .../org/sonar/server/rule/index/RuleIndex.java | 2 +- .../org/sonar/server/search/ws/BaseMapping.java | 5 +++-- .../org/sonar/server/search/ws/SearchOptions.java | 14 ++++++-------- .../sonar/server/test/index/CoveredFileDoc.java | 3 +-- .../java/org/sonar/server/test/index/TestDoc.java | 5 ++--- .../java/org/sonar/server/user/index/UserDoc.java | 8 +++----- .../java/org/sonar/server/view/index/ViewDoc.java | 3 +-- .../test/java/org/sonar/server/es/EsTester.java | 1 - .../test/java/org/sonar/server/es/EsUtilsTest.java | 8 +++----- .../java/org/sonar/server/search/BaseDocTest.java | 4 ++-- 24 files changed, 50 insertions(+), 64 deletions(-) rename server/sonar-server/src/main/java/org/sonar/server/{search => es}/BaseDoc.java (97%) rename server/sonar-server/src/main/java/org/sonar/server/{search/IndexSynchronizer.java => es/IndexerStartupTask.java} (91%) rename server/sonar-server/src/main/java/org/sonar/server/{search => es}/StickyFacetBuilder.java (99%) diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java index 2dcf5dcd9ec..4fe2f430a13 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java @@ -562,7 +562,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer { // NavigationWs.class, no Web Service in CE }; private static final Object[] STARTUP_COMPONENTS = new Object[] { - // IndexSynchronizer.class, ES maintenance, responsibility of Web Server + // IndexerStartupTask.class, ES maintenance, responsibility of Web Server EsIndexerEnabler.class, // RegisterMetrics.class, DB maintenance, responsibility of Web Server // RegisterQualityGates.class, DB maintenance, responsibility of Web Server diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/es/EsIndexerEnabler.java b/server/sonar-ce/src/main/java/org/sonar/ce/es/EsIndexerEnabler.java index bd038fa6807..716567e9756 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/es/EsIndexerEnabler.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/es/EsIndexerEnabler.java @@ -21,6 +21,7 @@ package org.sonar.ce.es; import org.picocontainer.Startable; import org.sonar.server.activity.index.ActivityIndexer; +import org.sonar.server.es.IndexerStartupTask; import org.sonar.server.issue.index.IssueAuthorizationIndexer; import org.sonar.server.issue.index.IssueIndexer; import org.sonar.server.test.index.TestIndexer; @@ -28,7 +29,7 @@ import org.sonar.server.user.index.UserIndexer; import org.sonar.server.view.index.ViewIndexer; /** - * Replaces the {@link org.sonar.server.search.IndexSynchronizer} to enable indexers but without triggering a full + * Replaces the {@link IndexerStartupTask} to enable indexers but without triggering a full * indexation (it's the WebServer's responsibility). */ public class EsIndexerEnabler implements Startable { diff --git a/server/sonar-server/src/main/java/org/sonar/server/activity/index/ActivityDoc.java b/server/sonar-server/src/main/java/org/sonar/server/activity/index/ActivityDoc.java index fe139aebdf1..02e17fd4beb 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/activity/index/ActivityDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/activity/index/ActivityDoc.java @@ -20,15 +20,13 @@ package org.sonar.server.activity.index; import com.google.common.annotations.VisibleForTesting; -import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.sonar.server.search.BaseDoc; - -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; - import java.util.Date; import java.util.HashMap; import java.util.Map; +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; +import org.apache.commons.lang.builder.ReflectionToStringBuilder; +import org.sonar.server.es.BaseDoc; public class ActivityDoc extends BaseDoc { diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/BaseDoc.java b/server/sonar-server/src/main/java/org/sonar/server/es/BaseDoc.java similarity index 97% rename from server/sonar-server/src/main/java/org/sonar/server/search/BaseDoc.java rename to server/sonar-server/src/main/java/org/sonar/server/es/BaseDoc.java index 69b3dfabc67..4a1226f70a3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/BaseDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/BaseDoc.java @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.search; - -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; +package org.sonar.server.es; import java.util.Date; import java.util.Map; +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; +import org.sonar.server.search.IndexUtils; import static com.google.common.collect.Maps.newHashMap; diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/BaseIndexer.java b/server/sonar-server/src/main/java/org/sonar/server/es/BaseIndexer.java index d4375262dcc..9978f7d4536 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/BaseIndexer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/BaseIndexer.java @@ -21,14 +21,13 @@ package org.sonar.server.es; import com.google.common.base.Throwables; import com.google.common.util.concurrent.Uninterruptibles; -import org.picocontainer.Startable; -import org.sonar.api.server.ServerSide; - import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import org.picocontainer.Startable; +import org.sonar.api.server.ServerSide; @ServerSide public abstract class BaseIndexer implements Startable { @@ -47,7 +46,7 @@ public abstract class BaseIndexer implements Startable { * asks for index refresh -> big performance hit. * * Indices are populated and refreshed when all startup components have been executed. See - * {@link org.sonar.server.search.IndexSynchronizer} + * {@link IndexerStartupTask} */ private boolean enabled = false; diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/EsUtils.java b/server/sonar-server/src/main/java/org/sonar/server/es/EsUtils.java index c506e7bea26..9c74c0e3a4a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/EsUtils.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/EsUtils.java @@ -39,7 +39,6 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.sonar.server.search.BaseDoc; public class EsUtils { diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java b/server/sonar-server/src/main/java/org/sonar/server/es/IndexerStartupTask.java similarity index 91% rename from server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java rename to server/sonar-server/src/main/java/org/sonar/server/es/IndexerStartupTask.java index 657d027a60b..e3d23474baa 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/IndexerStartupTask.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.search; +package org.sonar.server.es; import org.sonar.api.config.Settings; import org.sonar.api.utils.log.Logger; @@ -29,9 +29,9 @@ import org.sonar.server.test.index.TestIndexer; import org.sonar.server.user.index.UserIndexer; import org.sonar.server.view.index.ViewIndexer; -public class IndexSynchronizer { +public class IndexerStartupTask { - private static final Logger LOG = Loggers.get(IndexSynchronizer.class); + private static final Logger LOG = Loggers.get(IndexerStartupTask.class); private final TestIndexer testIndexer; private final IssueAuthorizationIndexer issueAuthorizationIndexer; @@ -46,7 +46,7 @@ public class IndexSynchronizer { * because we need {@link org.sonar.server.issue.index.IssueAuthorizationIndexer} to be executed before * {@link org.sonar.server.issue.index.IssueIndexer} */ - public IndexSynchronizer(TestIndexer testIndexer, IssueAuthorizationIndexer issueAuthorizationIndexer, IssueIndexer issueIndexer, + public IndexerStartupTask(TestIndexer testIndexer, IssueAuthorizationIndexer issueAuthorizationIndexer, IssueIndexer issueIndexer, UserIndexer userIndexer, ViewIndexer viewIndexer, ActivityIndexer activityIndexer, Settings settings) { this.testIndexer = testIndexer; diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/SearchResult.java b/server/sonar-server/src/main/java/org/sonar/server/es/SearchResult.java index 74e916130d6..c98c4303a62 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/SearchResult.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/SearchResult.java @@ -20,12 +20,10 @@ package org.sonar.server.es; import com.google.common.base.Function; -import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.sonar.server.search.BaseDoc; - import java.util.List; import java.util.Map; +import org.apache.commons.lang.builder.ReflectionToStringBuilder; +import org.elasticsearch.action.search.SearchResponse; public class SearchResult { diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/StickyFacetBuilder.java b/server/sonar-server/src/main/java/org/sonar/server/es/StickyFacetBuilder.java similarity index 99% rename from server/sonar-server/src/main/java/org/sonar/server/search/StickyFacetBuilder.java rename to server/sonar-server/src/main/java/org/sonar/server/es/StickyFacetBuilder.java index 546b4ac6b80..b4d210936a0 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/StickyFacetBuilder.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/StickyFacetBuilder.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.search; +package org.sonar.server.es; import com.google.common.base.Joiner; import java.util.Map; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueDoc.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueDoc.java index 777f4b14dfd..e43853c9134 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueDoc.java @@ -35,7 +35,7 @@ import org.sonar.api.rule.Severity; import org.sonar.api.rules.RuleType; import org.sonar.api.utils.Duration; import org.sonar.api.utils.KeyValueFormat; -import org.sonar.server.search.BaseDoc; +import org.sonar.server.es.BaseDoc; public class IssueDoc extends BaseDoc implements Issue { diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java index 0631d8e00c5..0739bda2433 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -74,10 +74,10 @@ import org.sonar.server.es.EsUtils; import org.sonar.server.es.SearchOptions; import org.sonar.server.es.SearchResult; import org.sonar.server.es.Sorting; +import org.sonar.server.es.StickyFacetBuilder; import org.sonar.server.exceptions.NotFoundException; import org.sonar.server.issue.IssueQuery; import org.sonar.server.rule.index.RuleIndexDefinition; -import org.sonar.server.search.StickyFacetBuilder; import org.sonar.server.user.UserSession; import org.sonar.server.view.index.ViewIndexDefinition; diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java index 3ad05d77909..662d46becab 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java @@ -20,12 +20,12 @@ package org.sonar.server.platform.platformlevel; import org.sonar.server.app.ProcessCommandWrapper; +import org.sonar.server.es.IndexerStartupTask; import org.sonar.server.issue.filter.RegisterIssueFilters; import org.sonar.server.platform.ServerLifecycleNotifier; import org.sonar.server.qualitygate.RegisterQualityGates; import org.sonar.server.qualityprofile.RegisterQualityProfiles; import org.sonar.server.rule.RegisterRules; -import org.sonar.server.search.IndexSynchronizer; import org.sonar.server.startup.ClearRulesOverloadedDebt; import org.sonar.server.startup.DisplayLogOnDeprecatedProjects; import org.sonar.server.startup.FeedUsersLocalStartupTask; @@ -49,7 +49,7 @@ public class PlatformLevelStartup extends PlatformLevel { @Override protected void configureLevel() { add( - IndexSynchronizer.class, + IndexerStartupTask.class, RegisterMetrics.class, RegisterQualityGates.class, RegisterRules.class, @@ -76,7 +76,7 @@ public class PlatformLevelStartup extends PlatformLevel { @Override protected void doPrivileged() { PlatformLevelStartup.super.start(); - getComponentByType(IndexSynchronizer.class).execute(); + getComponentByType(IndexerStartupTask.class).execute(); getComponentByType(ServerLifecycleNotifier.class).notifyStart(); getComponentByType(ProcessCommandWrapper.class).notifyOperational(); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/index/ActiveRuleDoc.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/index/ActiveRuleDoc.java index 5be909fa23b..bfebf07fd31 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/index/ActiveRuleDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/index/ActiveRuleDoc.java @@ -22,8 +22,8 @@ package org.sonar.server.qualityprofile.index; import com.google.common.collect.Maps; import javax.annotation.Nullable; import org.sonar.db.qualityprofile.ActiveRuleKey; +import org.sonar.server.es.BaseDoc; import org.sonar.server.qualityprofile.ActiveRule; -import org.sonar.server.search.BaseDoc; import static com.google.common.base.Preconditions.checkNotNull; import static org.apache.commons.lang.StringUtils.containsIgnoreCase; diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleDoc.java b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleDoc.java index a2908fb8e6f..0f20bb301bb 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleDoc.java @@ -27,7 +27,7 @@ import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rules.RuleType; -import org.sonar.server.search.BaseDoc; +import org.sonar.server.es.BaseDoc; /** * Implementation of Rule based on an Elasticsearch document diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java index 7e7fccfc38b..9578a8c0979 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java @@ -64,7 +64,7 @@ import org.sonar.server.es.BaseIndex; import org.sonar.server.es.EsClient; import org.sonar.server.es.SearchIdResult; import org.sonar.server.es.SearchOptions; -import org.sonar.server.search.StickyFacetBuilder; +import org.sonar.server.es.StickyFacetBuilder; import static org.elasticsearch.index.query.QueryBuilders.matchQuery; import static org.elasticsearch.index.query.QueryBuilders.simpleQueryStringQuery; diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/ws/BaseMapping.java b/server/sonar-server/src/main/java/org/sonar/server/search/ws/BaseMapping.java index 69169996bd9..3438f6a7f9f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/ws/BaseMapping.java +++ b/server/sonar-server/src/main/java/org/sonar/server/search/ws/BaseMapping.java @@ -27,14 +27,15 @@ import java.util.Set; import javax.annotation.Nullable; import org.sonar.api.server.ServerSide; import org.sonar.api.utils.text.JsonWriter; -import org.sonar.server.search.BaseDoc; +import org.sonar.server.es.BaseDoc; import org.sonar.server.search.IndexUtils; import org.sonar.server.search.QueryContext; /** - * Mapping of search documents (see {@link org.sonar.server.search.BaseDoc}) to WS JSON responses + * Mapping of search documents (see {@link BaseDoc}) to WS JSON responses */ @ServerSide +@Deprecated public abstract class BaseMapping { private final Multimap indexFieldsByWsFields = LinkedHashMultimap.create(); diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/ws/SearchOptions.java b/server/sonar-server/src/main/java/org/sonar/server/search/ws/SearchOptions.java index be75b06e49f..9dd44f98897 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/ws/SearchOptions.java +++ b/server/sonar-server/src/main/java/org/sonar/server/search/ws/SearchOptions.java @@ -19,23 +19,21 @@ */ package org.sonar.server.search.ws; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.text.JsonWriter; import org.sonar.server.search.QueryContext; import org.sonar.server.search.Result; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - /** * Generic options for search web services - * */ +@Deprecated public class SearchOptions { private int pageSize; diff --git a/server/sonar-server/src/main/java/org/sonar/server/test/index/CoveredFileDoc.java b/server/sonar-server/src/main/java/org/sonar/server/test/index/CoveredFileDoc.java index dc4b0fb6fc7..9668bf24b7f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/test/index/CoveredFileDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/test/index/CoveredFileDoc.java @@ -21,10 +21,9 @@ package org.sonar.server.test.index; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Maps; -import org.sonar.server.search.BaseDoc; - import java.util.List; import java.util.Map; +import org.sonar.server.es.BaseDoc; import static org.sonar.server.test.index.TestIndexDefinition.FIELD_COVERED_FILE_LINES; import static org.sonar.server.test.index.TestIndexDefinition.FIELD_COVERED_FILE_UUID; diff --git a/server/sonar-server/src/main/java/org/sonar/server/test/index/TestDoc.java b/server/sonar-server/src/main/java/org/sonar/server/test/index/TestDoc.java index 614f8ba7ba1..7a3d9b10d4a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/test/index/TestDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/test/index/TestDoc.java @@ -21,12 +21,11 @@ package org.sonar.server.test.index; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Maps; -import org.sonar.server.search.BaseDoc; - -import javax.annotation.CheckForNull; import java.util.ArrayList; import java.util.List; import java.util.Map; +import javax.annotation.CheckForNull; +import org.sonar.server.es.BaseDoc; import static org.sonar.server.test.index.TestIndexDefinition.FIELD_COVERED_FILES; import static org.sonar.server.test.index.TestIndexDefinition.FIELD_DURATION_IN_MS; diff --git a/server/sonar-server/src/main/java/org/sonar/server/user/index/UserDoc.java b/server/sonar-server/src/main/java/org/sonar/server/user/index/UserDoc.java index f075ed0ba7d..65c6fe72518 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/user/index/UserDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/user/index/UserDoc.java @@ -20,13 +20,11 @@ package org.sonar.server.user.index; import com.google.common.collect.Maps; -import org.sonar.api.user.User; -import org.sonar.server.search.BaseDoc; - -import javax.annotation.Nullable; - import java.util.List; import java.util.Map; +import javax.annotation.Nullable; +import org.sonar.api.user.User; +import org.sonar.server.es.BaseDoc; public class UserDoc extends BaseDoc implements User { diff --git a/server/sonar-server/src/main/java/org/sonar/server/view/index/ViewDoc.java b/server/sonar-server/src/main/java/org/sonar/server/view/index/ViewDoc.java index 5afea72b5aa..910055ab243 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/view/index/ViewDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/view/index/ViewDoc.java @@ -20,10 +20,9 @@ package org.sonar.server.view.index; import com.google.common.collect.Maps; -import org.sonar.server.search.BaseDoc; - import java.util.List; import java.util.Map; +import org.sonar.server.es.BaseDoc; public class ViewDoc extends BaseDoc { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java index c08b19d6f55..6d706d1d775 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java @@ -50,7 +50,6 @@ import org.elasticsearch.search.SearchHit; import org.junit.rules.ExternalResource; import org.sonar.api.config.Settings; import org.sonar.core.platform.ComponentContainer; -import org.sonar.server.search.BaseDoc; import org.sonar.test.TestUtils; import static com.google.common.collect.Lists.newArrayList; diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsUtilsTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsUtilsTest.java index 017caf140c1..25c6f83b403 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/EsUtilsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsUtilsTest.java @@ -20,18 +20,16 @@ package org.sonar.server.es; import com.google.common.base.Function; +import java.util.Date; +import java.util.List; +import java.util.Map; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.junit.Test; import org.mockito.Mockito; import org.sonar.server.issue.index.IssueDoc; -import org.sonar.server.search.BaseDoc; import org.sonar.test.TestUtils; -import java.util.Date; -import java.util.List; -import java.util.Map; - import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java index a626beaafb6..53bea5371f3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java @@ -20,11 +20,11 @@ package org.sonar.server.search; import com.google.common.collect.Maps; -import org.junit.Test; - import java.util.Collections; import java.util.Date; import java.util.Map; +import org.junit.Test; +import org.sonar.server.es.BaseDoc; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; -- 2.39.5