From 0162ead4e6896a755eecc8a2aa68db5e20bdd86c Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 29 Oct 2013 10:15:17 +0100 Subject: Fix log duplications when merging technical debt model from plugins --- .../main/java/org/sonar/core/technicaldebt/TechnicalDebtManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sonar-core') 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); } } -- cgit v1.2.3