From: Simon Brandhof Date: Wed, 4 Sep 2013 10:06:57 +0000 (+0200) Subject: Fix quality flaw X-Git-Tag: 3.7.1~5^2~15^2~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9920ceb7d337e93223a30333236f42a446a2e1f0;p=sonarqube.git Fix quality flaw --- diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/MemoryOptimizer.java b/sonar-batch/src/main/java/org/sonar/batch/index/MemoryOptimizer.java index 543028f30a8..df594b1305c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/MemoryOptimizer.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/MemoryOptimizer.java @@ -71,11 +71,11 @@ public class MemoryOptimizer implements SensorExecutionHandler, DecoratorExecuti Integer dataId = dataIdByMeasureId.get(measure.getId()); MeasureData data = session.getSingleResult(MeasureData.class, "id", dataId); if (data == null) { - LoggerFactory.getLogger(getClass()).error("The MEASURE_DATA row with id " + dataId + " is lost"); + LOG.error("The MEASURE_DATA row with id {} is lost", dataId); } else { if (LOG.isDebugEnabled()) { - LOG.debug("Reload the data measure: " + measure.getMetricKey() + ", id=" + measure.getId()); + LOG.debug("Reload the data measure: {}, id={}", measure.getMetricKey(), measure.getId()); } measure.setData(data.getText()); loadedMeasures.add(measure); @@ -86,7 +86,7 @@ public class MemoryOptimizer implements SensorExecutionHandler, DecoratorExecuti public void flushMemory() { if (LOG.isDebugEnabled() && !loadedMeasures.isEmpty()) { - LOG.debug("Flush " + loadedMeasures.size() + " data measures from memory: "); + LOG.debug("Flush {} data measures from memory: ", loadedMeasures.size()); } for (Measure measure : loadedMeasures) { measure.unsetData();