aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorJanos Gyerik <janos.gyerik@sonarsource.com>2019-04-08 14:00:33 +0200
committerSonarTech <sonartech@sonarsource.com>2019-04-09 20:21:05 +0200
commit322555079354081f2e194aaea8abf8e826dfece9 (patch)
tree2a6cd3a8a0f26436d4359dbbd9d197a0bf63f118 /sonar-scanner-engine
parent6fe2c0ddd848b7b176660bdb2d37d1fb56309375 (diff)
downloadsonarqube-322555079354081f2e194aaea8abf8e826dfece9.tar.gz
sonarqube-322555079354081f2e194aaea8abf8e826dfece9.zip
Fix simple quality issues
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java
index 454d2a6815a..63f30c85f2c 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java
@@ -63,11 +63,12 @@ public class ScmChangedFilesProvider extends ProviderAdapter {
@CheckForNull
private static Collection<Path> loadChangedFilesIfNeeded(ScmConfiguration scmConfiguration, BranchConfiguration branchConfiguration, Path rootBaseDir) {
- if (branchConfiguration.isShortOrPullRequest() && branchConfiguration.targetScmBranch() != null) {
+ String targetScmBranch = branchConfiguration.targetScmBranch();
+ if (branchConfiguration.isShortOrPullRequest() && targetScmBranch != null) {
ScmProvider scmProvider = scmConfiguration.provider();
if (scmProvider != null) {
Profiler profiler = Profiler.create(LOG).startInfo(LOG_MSG);
- Collection<Path> changedFiles = scmProvider.branchChangedFiles(branchConfiguration.targetScmBranch(), rootBaseDir);
+ Collection<Path> changedFiles = scmProvider.branchChangedFiles(targetScmBranch, rootBaseDir);
profiler.stopInfo();
if (changedFiles != null) {
LOG.debug("SCM reported {} {} changed in the branch", changedFiles.size(), ScannerUtils.pluralize("file", changedFiles.size()));