From 9920ceb7d337e93223a30333236f42a446a2e1f0 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 4 Sep 2013 12:06:57 +0200 Subject: [PATCH] Fix quality flaw --- .../main/java/org/sonar/batch/index/MemoryOptimizer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.39.5