From 1ef5de2df1f03e4d0a381e619353267c13448b21 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 24 Feb 2016 16:31:10 +0100 Subject: [PATCH] Move IssueUpdater from sonar-core to sonar-server --- .../computation/issue/IssueAssigner.java | 2 +- .../computation/issue/IssueLifecycle.java | 2 +- .../computation/issue/NewDebtCalculator.java | 2 +- .../issue/AbstractChangeTagsAction.java | 1 - .../org/sonar/server/issue/ActionService.java | 1 - .../org/sonar/server/issue/AddTagsAction.java | 1 - .../org/sonar/server/issue/AssignAction.java | 1 - .../org/sonar/server/issue/CommentAction.java | 1 - .../server/issue/IssueChangelogFormatter.java | 1 - .../server/issue/IssueCommentService.java | 2 -- .../org/sonar/server/issue/IssueService.java | 1 - .../org/sonar/server}/issue/IssueUpdater.java | 5 ++++- .../org/sonar/server/issue/PlanAction.java | 1 - .../sonar/server/issue/RemoveTagsAction.java | 1 - .../sonar/server/issue/SetSeverityAction.java | 1 - .../issue/actionplan/ActionPlanService.java | 2 +- .../issue/workflow/FunctionExecutor.java | 2 +- .../server/issue/workflow/IssueWorkflow.java | 2 +- .../platformlevel/PlatformLevel4.java | 2 +- .../computation/issue/IssueAssignerTest.java | 2 +- .../computation/issue/IssueLifecycleTest.java | 2 +- .../sonar/server/issue/ActionServiceTest.java | 1 - .../sonar/server/issue/AddTagsActionTest.java | 1 - .../sonar/server/issue/AssignActionTest.java | 1 - .../sonar/server/issue/CommentActionTest.java | 1 - .../server/issue/IssueCommentServiceTest.java | 1 - .../sonar/server}/issue/IssueUpdaterTest.java | 20 +++++++++++-------- .../sonar/server/issue/PlanActionTest.java | 1 - .../server/issue/RemoveTagsActionTest.java | 1 - .../server/issue/SetSeverityActionTest.java | 1 - .../actionplan/ActionPlanServiceTest.java | 2 +- .../issue/workflow/IssueWorkflowTest.java | 2 +- 32 files changed, 27 insertions(+), 40 deletions(-) rename {sonar-core/src/main/java/org/sonar/core => server/sonar-server/src/main/java/org/sonar/server}/issue/IssueUpdater.java (98%) rename {sonar-core/src/test/java/org/sonar/core => server/sonar-server/src/test/java/org/sonar/server}/issue/IssueUpdaterTest.java (96%) diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueAssigner.java b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueAssigner.java index be57b30ca56..293c650dafe 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueAssigner.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueAssigner.java @@ -28,7 +28,7 @@ import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.server.computation.analysis.AnalysisMetadataHolder; import org.sonar.server.computation.component.Component; import org.sonar.server.computation.scm.ScmInfo; diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java index cc01fdf8611..33ab0b5f1d2 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java @@ -25,7 +25,7 @@ import javax.annotation.Nullable; import org.sonar.api.issue.Issue; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.server.issue.workflow.IssueWorkflow; import org.sonar.core.util.Uuids; import org.sonar.server.computation.analysis.AnalysisMetadataHolder; diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/NewDebtCalculator.java b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/NewDebtCalculator.java index adae0a498a9..3c9d7845be2 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/NewDebtCalculator.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/NewDebtCalculator.java @@ -36,7 +36,7 @@ import javax.annotation.Nullable; import org.apache.commons.lang.time.DateUtils; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.FieldDiffs; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.db.issue.IssueChangeDto; import org.sonar.server.computation.period.Period; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/AbstractChangeTagsAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/AbstractChangeTagsAction.java index 28be9a3128d..a54f6ffc302 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/AbstractChangeTagsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/AbstractChangeTagsAction.java @@ -27,7 +27,6 @@ import org.sonar.api.issue.Issue; import org.sonar.api.issue.condition.IsUnResolved; import org.sonar.core.issue.DefaultIssue; import org.sonar.api.server.rule.RuleTagFormat; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.user.UserSession; import java.util.Collection; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java index 5f3d41c134c..b517e01fbe1 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java @@ -33,7 +33,6 @@ import org.sonar.api.issue.action.Function; import org.sonar.api.server.ServerSide; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.server.properties.ProjectSettingsFactory; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/AddTagsAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/AddTagsAction.java index ff93b503799..4e27a00de11 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/AddTagsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/AddTagsAction.java @@ -21,7 +21,6 @@ package org.sonar.server.issue; import com.google.common.collect.Sets; import org.sonar.api.server.ServerSide; -import org.sonar.core.issue.IssueUpdater; import java.util.Collection; import java.util.Set; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/AssignAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/AssignAction.java index 38b9ab1eca5..19a44bb3d6f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/AssignAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/AssignAction.java @@ -28,7 +28,6 @@ import org.sonar.api.server.ServerSide; import org.sonar.api.user.User; import org.sonar.api.user.UserFinder; import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.user.UserSession; @ServerSide diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/CommentAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/CommentAction.java index d7075a443be..2c56f233220 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/CommentAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/CommentAction.java @@ -25,7 +25,6 @@ import java.util.Map; import org.sonar.api.issue.Issue; import org.sonar.api.server.ServerSide; import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.user.UserSession; @ServerSide diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelogFormatter.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelogFormatter.java index 8f868cac42a..e9e7e55faae 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelogFormatter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelogFormatter.java @@ -28,7 +28,6 @@ import org.sonar.api.i18n.I18n; import org.sonar.core.issue.FieldDiffs; import org.sonar.api.utils.Duration; import org.sonar.api.utils.Durations; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.user.UserSession; import static com.google.common.collect.Lists.newArrayList; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java index fc83784aaa7..6fb50b2a36f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java @@ -22,13 +22,11 @@ package org.sonar.server.issue; import com.google.common.base.Objects; import com.google.common.base.Strings; import org.apache.commons.lang.StringUtils; -import org.sonar.api.server.ServerSide; import org.sonar.api.issue.IssueComment; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.DefaultIssueComment; import org.sonar.core.issue.IssueChangeContext; import org.sonar.api.utils.System2; -import org.sonar.core.issue.IssueUpdater; import org.sonar.db.issue.IssueChangeDto; import org.sonar.db.DbSession; import org.sonar.db.DbClient; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java index c9bee6d5f74..09c2c041d2c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java @@ -44,7 +44,6 @@ import org.sonar.api.web.UserRole; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.DefaultIssueBuilder; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.issue.workflow.IssueWorkflow; import org.sonar.server.issue.workflow.Transition; import org.sonar.db.DbClient; diff --git a/sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueUpdater.java similarity index 98% rename from sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java rename to server/sonar-server/src/main/java/org/sonar/server/issue/IssueUpdater.java index c6919762f0e..303a430134c 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueUpdater.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.core.issue; +package org.sonar.server.issue; import com.google.common.base.Function; import com.google.common.base.Joiner; @@ -37,6 +37,9 @@ import org.sonar.api.server.ServerSide; import org.sonar.api.server.rule.RuleTagFormat; import org.sonar.api.user.User; import org.sonar.api.utils.Duration; +import org.sonar.core.issue.DefaultIssue; +import org.sonar.core.issue.DefaultIssueComment; +import org.sonar.core.issue.IssueChangeContext; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Strings.isNullOrEmpty; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/PlanAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/PlanAction.java index e86e77d1fd2..7d82e9be151 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/PlanAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/PlanAction.java @@ -27,7 +27,6 @@ import org.sonar.api.issue.Issue; import org.sonar.api.issue.condition.IsUnResolved; import org.sonar.api.server.ServerSide; import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.issue.actionplan.ActionPlanService; import org.sonar.server.user.UserSession; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/RemoveTagsAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/RemoveTagsAction.java index 5798428b90f..c9cb09c465b 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/RemoveTagsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/RemoveTagsAction.java @@ -21,7 +21,6 @@ package org.sonar.server.issue; import com.google.common.collect.Sets; import org.sonar.api.server.ServerSide; -import org.sonar.core.issue.IssueUpdater; import java.util.Collection; import java.util.Set; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java index 9bc86b568eb..75656f961ad 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java @@ -28,7 +28,6 @@ import org.sonar.api.issue.condition.IsUnResolved; import org.sonar.api.server.ServerSide; import org.sonar.api.web.UserRole; import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.user.UserSession; @ServerSide diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/actionplan/ActionPlanService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/actionplan/ActionPlanService.java index 4ee93f6ded3..f425dd87295 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/actionplan/ActionPlanService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/actionplan/ActionPlanService.java @@ -33,7 +33,7 @@ import org.sonar.core.issue.ActionPlanStats; import org.sonar.core.issue.DefaultActionPlan; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.component.ResourceDao; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/FunctionExecutor.java b/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/FunctionExecutor.java index 9b9c88b303a..392bb204fd7 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/FunctionExecutor.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/FunctionExecutor.java @@ -25,7 +25,7 @@ import org.sonar.api.server.ServerSide; import org.sonar.api.user.User; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; @ServerSide public class FunctionExecutor { diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/IssueWorkflow.java b/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/IssueWorkflow.java index bb65c579d52..b46048b6d66 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/IssueWorkflow.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/workflow/IssueWorkflow.java @@ -29,7 +29,7 @@ import org.sonar.api.server.ServerSide; import org.sonar.api.web.UserRole; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; @ServerSide public class IssueWorkflow implements Startable { diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java index 9236429f5ba..a6f46242d5f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java @@ -31,7 +31,7 @@ import org.sonar.api.rules.AnnotationRuleParser; import org.sonar.api.rules.XMLRuleParser; import org.sonar.api.server.rule.RulesDefinitionXmlLoader; import org.sonar.core.component.DefaultResourceTypes; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.server.issue.workflow.FunctionExecutor; import org.sonar.server.issue.workflow.IssueWorkflow; import org.sonar.core.timemachine.Periods; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueAssignerTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueAssignerTest.java index 1abcbc0d81b..5a929c0d149 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueAssignerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueAssignerTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.server.computation.analysis.AnalysisMetadataHolderRule; import org.sonar.server.computation.component.Component; import org.sonar.server.computation.scm.Changeset; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueLifecycleTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueLifecycleTest.java index 844d0ff8bbf..f9957a41dce 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueLifecycleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueLifecycleTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.sonar.api.utils.Duration; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.server.issue.workflow.IssueWorkflow; import org.sonar.db.protobuf.DbCommons; import org.sonar.db.protobuf.DbIssues; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java index dac1cf20a82..ed6f5695b32 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java @@ -30,7 +30,6 @@ import org.sonar.api.issue.action.Function; import org.sonar.api.issue.condition.Condition; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.component.ComponentDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/AddTagsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/AddTagsActionTest.java index 764afc96b86..ec27342bf6c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/AddTagsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/AddTagsActionTest.java @@ -27,7 +27,6 @@ import org.junit.rules.ExpectedException; import org.mockito.Matchers; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import java.util.Collection; import java.util.Map; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java index b5a3c05a4c2..e9462422ecd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java @@ -28,7 +28,6 @@ import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; import org.sonar.api.user.User; import org.sonar.api.user.UserFinder; -import org.sonar.core.issue.IssueUpdater; import org.sonar.core.user.DefaultUser; import org.sonar.server.user.ThreadLocalUserSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java index 95a93d5d25f..dea9d87c82c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java @@ -26,7 +26,6 @@ import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.tester.AnonymousMockUserSession; import static com.google.common.collect.Maps.newHashMap; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java index c754980f12a..c02a79c08ea 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java @@ -30,7 +30,6 @@ import org.mockito.runners.MockitoJUnitRunner; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.DefaultIssueComment; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import org.sonar.core.permission.GlobalPermissions; import org.sonar.db.DbClient; import org.sonar.db.DbSession; diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueUpdaterTest.java similarity index 96% rename from sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java rename to server/sonar-server/src/test/java/org/sonar/server/issue/IssueUpdaterTest.java index 247e551213b..b536a6d1c7c 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueUpdaterTest.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.core.issue; +package org.sonar.server.issue; import java.util.Date; import org.junit.Before; @@ -27,16 +27,20 @@ import org.junit.rules.ExpectedException; import org.sonar.api.issue.ActionPlan; import org.sonar.api.user.User; import org.sonar.api.utils.Duration; +import org.sonar.core.issue.DefaultActionPlan; +import org.sonar.core.issue.DefaultIssue; +import org.sonar.core.issue.FieldDiffs; +import org.sonar.core.issue.IssueChangeContext; import org.sonar.core.user.DefaultUser; import static org.assertj.core.api.Assertions.assertThat; -import static org.sonar.core.issue.IssueUpdater.ACTION_PLAN; -import static org.sonar.core.issue.IssueUpdater.ASSIGNEE; -import static org.sonar.core.issue.IssueUpdater.RESOLUTION; -import static org.sonar.core.issue.IssueUpdater.SEVERITY; -import static org.sonar.core.issue.IssueUpdater.STATUS; -import static org.sonar.core.issue.IssueUpdater.TECHNICAL_DEBT; -import static org.sonar.core.issue.IssueUpdater.UNUSED; +import static org.sonar.server.issue.IssueUpdater.ACTION_PLAN; +import static org.sonar.server.issue.IssueUpdater.ASSIGNEE; +import static org.sonar.server.issue.IssueUpdater.RESOLUTION; +import static org.sonar.server.issue.IssueUpdater.SEVERITY; +import static org.sonar.server.issue.IssueUpdater.STATUS; +import static org.sonar.server.issue.IssueUpdater.TECHNICAL_DEBT; +import static org.sonar.server.issue.IssueUpdater.UNUSED; public class IssueUpdaterTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java index df4974f8567..05e28447b30 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java @@ -28,7 +28,6 @@ import org.sonar.api.issue.Issue; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; import org.sonar.core.issue.DefaultActionPlan; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.issue.actionplan.ActionPlanService; import org.sonar.server.user.ThreadLocalUserSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/RemoveTagsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/RemoveTagsActionTest.java index 60c8ca20742..efe5914e89c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/RemoveTagsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/RemoveTagsActionTest.java @@ -27,7 +27,6 @@ import org.junit.rules.ExpectedException; import org.mockito.Matchers; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import java.util.Collection; import java.util.Map; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java index 6e5154626de..2a6d4613c2e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java @@ -28,7 +28,6 @@ import org.sonar.api.issue.Issue; import org.sonar.api.web.UserRole; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; import org.sonar.server.tester.AnonymousMockUserSession; import org.sonar.server.tester.UserSessionRule; import org.sonar.server.user.UserSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java index 7ecda866583..3076cf36686 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java @@ -34,7 +34,7 @@ import org.sonar.core.issue.ActionPlanStats; import org.sonar.core.issue.DefaultActionPlan; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.component.ResourceDao; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/workflow/IssueWorkflowTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/workflow/IssueWorkflowTest.java index 1900c2c0ce1..abc253ed079 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/workflow/IssueWorkflowTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/workflow/IssueWorkflowTest.java @@ -32,7 +32,7 @@ import org.sonar.api.issue.DefaultTransitions; import org.sonar.api.rule.RuleKey; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; +import org.sonar.server.issue.IssueUpdater; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; -- 2.39.5