aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-08-13 17:18:09 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-08-13 17:21:11 +0200
commit853937dea8fdfe8677b74430f6951682e9b85ddb (patch)
tree63f9cfd86a264711d2048fc864af95ebc4133d18 /sonar-plugin-api
parentf7db31bcabc7ea3c1b35e2ae0196ea91bec8b690 (diff)
downloadsonarqube-853937dea8fdfe8677b74430f6951682e9b85ddb.tar.gz
sonarqube-853937dea8fdfe8677b74430f6951682e9b85ddb.zip
Improve quality
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/log/DefaultProfiler.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/log/DefaultProfiler.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/log/DefaultProfiler.java
index 266e4f10742..cb5d1c9d395 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/log/DefaultProfiler.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/log/DefaultProfiler.java
@@ -30,6 +30,7 @@ import java.util.Objects;
class DefaultProfiler extends Profiler {
private static final String CONTEXT_SEPARATOR = " | ";
+ private static final String DONE_SUFFIX = " (done)";
private final LinkedHashMap<String, Object> context = new LinkedHashMap<>();
private final BaseLogger logger;
@@ -94,12 +95,12 @@ class DefaultProfiler extends Profiler {
@Override
public Profiler stopTrace() {
- return doStopWithoutMessage(LoggerLevel.TRACE, " (done)");
+ return doStopWithoutMessage(LoggerLevel.TRACE, DONE_SUFFIX);
}
@Override
public Profiler stopDebug() {
- return doStopWithoutMessage(LoggerLevel.DEBUG, " (done)");
+ return doStopWithoutMessage(LoggerLevel.DEBUG, DONE_SUFFIX);
}
@Override
@@ -110,7 +111,7 @@ class DefaultProfiler extends Profiler {
@Override
public Profiler stopInfo(boolean cacheUsed) {
- String suffix = cacheUsed ? " (done from cache)" : " (done)";
+ String suffix = cacheUsed ? " (done from cache)" : DONE_SUFFIX;
return doStopWithoutMessage(LoggerLevel.INFO, suffix);
}