diff options
author | Janos Gyerik <janos.gyerik@sonarsource.com> | 2019-04-08 14:00:33 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-04-09 20:21:05 +0200 |
commit | 322555079354081f2e194aaea8abf8e826dfece9 (patch) | |
tree | 2a6cd3a8a0f26436d4359dbbd9d197a0bf63f118 /sonar-scanner-engine | |
parent | 6fe2c0ddd848b7b176660bdb2d37d1fb56309375 (diff) | |
download | sonarqube-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.java | 5 |
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())); |