diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-09-21 18:28:06 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-09-30 16:27:12 +0200 |
commit | 806c04edb2169d2523225bf67e32729b20bf0ef2 (patch) | |
tree | 5e880a05b70fdd0c845acfe819ca92a924d4e2aa /sonar-batch | |
parent | 9c8e8037819a407070fe01dc000d98f4e250089d (diff) | |
download | sonarqube-806c04edb2169d2523225bf67e32729b20bf0ef2.tar.gz sonarqube-806c04edb2169d2523225bf67e32729b20bf0ef2.zip |
Fix quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java index add0f3d157e..ab0f960c6a1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java @@ -21,8 +21,8 @@ package org.sonar.batch.repository; import javax.annotation.Nullable; import org.apache.commons.lang.mutable.MutableBoolean; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.sonar.api.utils.log.Logger; +import org.sonar.api.utils.log.Loggers; import org.sonar.batch.analysis.DefaultAnalysisMode; import org.sonar.batch.cache.WSLoader; import org.sonar.batch.cache.WSLoaderResult; @@ -32,7 +32,7 @@ import org.sonar.batch.util.BatchUtils; public class DefaultProjectRepositoriesLoader implements ProjectRepositoriesLoader { - private static final Logger LOG = LoggerFactory.getLogger(DefaultProjectRepositoriesLoader.class); + private static final Logger LOG = Loggers.get(DefaultProjectRepositoriesLoader.class); private static final String BATCH_PROJECT_URL = "/scanner/project"; private final WSLoader wsLoader; @@ -53,13 +53,12 @@ public class DefaultProjectRepositoriesLoader implements ProjectRepositoriesLoad } url += "&preview=" + analysisMode.isIssues(); - ProjectRepositories projectRepositories = load(url, fromCache); - return projectRepositories; + return load(url, fromCache); } private ProjectRepositories load(String resource, @Nullable MutableBoolean fromCache) { WSLoaderResult<String> result = wsLoader.loadString(resource); - if(fromCache != null) { + if (fromCache != null) { fromCache.setValue(result.isFromCache()); } return ProjectRepositories.fromJson(result.get()); |