diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2013-11-06 14:38:40 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2013-11-06 14:38:40 +0100 |
commit | b5116218aebe1ae7ca6f3abcd77b507ae3cb5131 (patch) | |
tree | 9b256ca26109b39a236ae5cb7e199b021588eafb /plugins | |
parent | 373924bdca4f3ac6fb21948625678c4238e6e664 (diff) | |
download | sonarqube-b5116218aebe1ae7ca6f3abcd77b507ae3cb5131.tar.gz sonarqube-b5116218aebe1ae7ca6f3abcd77b507ae3cb5131.zip |
Rename TechnicalDebt class name to WorkDayDuration and move it to issue internal package
Diffstat (limited to 'plugins')
2 files changed, 5 insertions, 10 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java index a72c178e9cf..d244dce5501 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java @@ -25,17 +25,13 @@ import com.google.common.collect.Lists; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.Decorator; -import org.sonar.api.batch.DecoratorBarriers; -import org.sonar.api.batch.DecoratorContext; -import org.sonar.api.batch.DependedUpon; -import org.sonar.api.batch.DependsUpon; -import org.sonar.api.batch.SonarIndex; +import org.sonar.api.batch.*; import org.sonar.api.component.ResourcePerspectives; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.issue.internal.DefaultIssue; import org.sonar.api.issue.internal.IssueChangeContext; +import org.sonar.api.issue.internal.WorkDayDuration; import org.sonar.api.profiles.RulesProfile; import org.sonar.api.resources.Project; import org.sonar.api.resources.Resource; @@ -43,7 +39,6 @@ import org.sonar.api.resources.ResourceUtils; import org.sonar.api.rules.ActiveRule; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RuleFinder; -import org.sonar.api.technicaldebt.TechnicalDebt; import org.sonar.api.utils.KeyValueFormat; import org.sonar.batch.issue.IssueCache; import org.sonar.batch.scan.LastSnapshots; @@ -176,7 +171,7 @@ public class IssueTrackingDecorator implements Decorator { updater.setPastMessage(issue, ref.getMessage(), changeContext); updater.setPastEffortToFix(issue, ref.getEffortToFix(), changeContext); Long technicalDebt = ref.getTechnicalDebt(); - TechnicalDebt previousTechnicalDebt = technicalDebt != null ? TechnicalDebt.fromLong(technicalDebt) : null; + WorkDayDuration previousTechnicalDebt = technicalDebt != null ? WorkDayDuration.fromLong(technicalDebt) : null; updater.setPastTechnicalDebt(issue, previousTechnicalDebt, changeContext); } } diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java index c01199f3c61..ddf259cacd8 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java @@ -29,6 +29,7 @@ import org.sonar.api.component.ResourcePerspectives; import org.sonar.api.issue.Issue; import org.sonar.api.issue.internal.DefaultIssue; import org.sonar.api.issue.internal.IssueChangeContext; +import org.sonar.api.issue.internal.WorkDayDuration; import org.sonar.api.profiles.RulesProfile; import org.sonar.api.resources.File; import org.sonar.api.resources.Project; @@ -36,7 +37,6 @@ import org.sonar.api.resources.Resource; import org.sonar.api.rule.RuleKey; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RuleFinder; -import org.sonar.api.technicaldebt.TechnicalDebt; import org.sonar.batch.issue.IssueCache; import org.sonar.batch.scan.LastSnapshots; import org.sonar.core.issue.IssueUpdater; @@ -519,7 +519,7 @@ public class IssueTrackingDecoratorTest extends AbstractDaoTestCase { verify(updater).setPastLine(eq(issue), eq(10)); verify(updater).setPastMessage(eq(issue), eq("Message"), any(IssueChangeContext.class)); verify(updater).setPastEffortToFix(eq(issue), eq(1.5), any(IssueChangeContext.class)); - verify(updater).setPastTechnicalDebt(eq(issue), eq(TechnicalDebt.of(1, 0, 0)), any(IssueChangeContext.class)); + verify(updater).setPastTechnicalDebt(eq(issue), eq(WorkDayDuration.of(1, 0, 0)), any(IssueChangeContext.class)); } @Test |