diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-03 17:52:05 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-03 17:52:32 +0200 |
commit | fcb07c6af06f952f5c241470ffaef47b6d5df8ed (patch) | |
tree | 73fe1861970e4ff015b20d8e9039e05cb4041251 /plugins | |
parent | ac849445803cfb26d9a7bf298fc4320ae941bd2f (diff) | |
download | sonarqube-fcb07c6af06f952f5c241470ffaef47b6d5df8ed.tar.gz sonarqube-fcb07c6af06f952f5c241470ffaef47b6d5df8ed.zip |
Create a new DebtModel API on batch side
Diffstat (limited to 'plugins')
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/DebtDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/DebtDecorator.java index d948742da26..2caf164d9c2 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/DebtDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/DebtDecorator.java @@ -121,7 +121,7 @@ public final class DebtDecorator implements Decorator { if (debt != null) { Rule rule = rules.find(ruleKey); if (rule != null) { - String characteristicKey = rule.debtCharacteristic(); + String characteristicKey = rule.debtSubCharacteristic(); if (characteristicKey != null) { Characteristic characteristic = model.characteristicByKey(characteristicKey); if (characteristic != null) { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/technicaldebt/DebtDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/technicaldebt/DebtDecoratorTest.java index aff369faab5..2aac5804446 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/technicaldebt/DebtDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/technicaldebt/DebtDecoratorTest.java @@ -98,8 +98,8 @@ public class DebtDecoratorTest { public void before() throws Exception { when(perspectives.as(Issuable.class, resource)).thenReturn(issuable); RulesBuilder rulesBuilder = new RulesBuilder(); - rulesBuilder.add(ruleKey1).setName("rule1").setDebtCharacteristic("MEMORY_EFFICIENCY"); - rulesBuilder.add(ruleKey2).setName("rule2").setDebtCharacteristic("MODULARITY"); + rulesBuilder.add(ruleKey1).setName("rule1").setDebtSubCharacteristic("MEMORY_EFFICIENCY"); + rulesBuilder.add(ruleKey2).setName("rule2").setDebtSubCharacteristic("MODULARITY"); rules = rulesBuilder.build(); when(ruleFinder.findByKey(ruleKey1)).thenReturn(org.sonar.api.rules.Rule.create(ruleKey1.repository(), ruleKey1.rule())); |