aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-10-29 10:15:17 +0100
committerJulien Lancelot <julien.lancelot@gmail.com>2013-10-29 10:15:28 +0100
commit0162ead4e6896a755eecc8a2aa68db5e20bdd86c (patch)
tree9811dc1f9583720accc24f4eb4301affa9b7e38f /sonar-core
parent336b4ea25cf4ac0d517903625f86655897b0e56d (diff)
downloadsonarqube-0162ead4e6896a755eecc8a2aa68db5e20bdd86c.tar.gz
sonarqube-0162ead4e6896a755eecc8a2aa68db5e20bdd86c.zip
Fix log duplications when merging technical debt model from plugins
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/technicaldebt/TechnicalDebtManager.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/technicaldebt/TechnicalDebtManager.java b/sonar-core/src/main/java/org/sonar/core/technicaldebt/TechnicalDebtManager.java
index a9ec2112b6c..76f854c5b36 100644
--- a/sonar-core/src/main/java/org/sonar/core/technicaldebt/TechnicalDebtManager.java
+++ b/sonar-core/src/main/java/org/sonar/core/technicaldebt/TechnicalDebtManager.java
@@ -70,11 +70,12 @@ public class TechnicalDebtManager implements ServerExtension {
Model defaultModel = loadModelFromXml(TechnicalDebtModelRepository.DEFAULT_MODEL, messages, rulesCache);
Model model = loadOrCreateModelFromDb(defaultModel, messages, rulesCache);
mergePlugins(model, defaultModel, messages, rulesCache);
+ messages.log(LOG);
session.save(model);
return model;
}
- public Model loadModel(){
+ public Model loadModel() {
return modelFinder.findByName(TechnicalDebtModel.MODEL_NAME);
}
@@ -96,10 +97,8 @@ public class TechnicalDebtManager implements ServerExtension {
}
public void mergePlugin(Model pluginModel, Model existingModel, ValidationMessages messages, TechnicalDebtRuleCache rulesCache) {
- messages.log(LOG);
if (!messages.hasErrors()) {
new TechnicalDebtMergeModel(existingModel).mergeWith(pluginModel, messages, rulesCache);
- messages.log(LOG);
}
}