aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/main/java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-01-27 14:46:29 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-01-27 14:46:42 +0100
commit3f8e45260624a3a751133a90e59ab1b382a3ea5b (patch)
tree0f7a4c32ce7ea7d3f7e957d7217f92d93d2fe895 /sonar-batch/src/main/java
parent66ff78c6a815157f2bf42465c6f75b360df5697f (diff)
downloadsonarqube-3f8e45260624a3a751133a90e59ab1b382a3ea5b.tar.gz
sonarqube-3f8e45260624a3a751133a90e59ab1b382a3ea5b.zip
SONAR-926 increase performance of DefaultSensorContext#logWarning()
Diffstat (limited to 'sonar-batch/src/main/java')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java
index 36e84cea339..be1cedaaf91 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java
@@ -94,8 +94,10 @@ public class DefaultSensorContext implements SensorContext {
}
private void logWarning() {
- LOG.debug("Plugins are no more responsible for indexing physical resources like directories and files. This is now handled by the platform.", new SonarException(
- "Plugin should not index physical resources"));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Plugins are no more responsible for indexing physical resources like directories and files. This is now handled by the platform.", new SonarException(
+ "Plugin should not index physical resources"));
+ }
}
@Override