aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2022-03-23 14:53:02 -0500
committersonartech <sonartech@sonarsource.com>2022-03-24 20:03:07 +0000
commit6f055b4762d71bc42d561974e1c157d5ab036602 (patch)
tree77b0279af82458c5bc1eb22e45de03fb296b1fbe /sonar-scanner-engine/src
parentde2a43957a00a246a9e877a30a04eabae33a6973 (diff)
downloadsonarqube-6f055b4762d71bc42d561974e1c157d5ab036602.tar.gz
sonarqube-6f055b4762d71bc42d561974e1c157d5ab036602.zip
Improve SQ code quality
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ReferenceBranchSupplier.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ReferenceBranchSupplier.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ReferenceBranchSupplier.java
index b700fa59ada..a389741ff36 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ReferenceBranchSupplier.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ReferenceBranchSupplier.java
@@ -90,7 +90,7 @@ public class ReferenceBranchSupplier {
Optional<String> value = configuration.get(NEW_CODE_PARAM_KEY);
if (value.isPresent()) {
String referenceBranchName = value.get();
- if (getBranchName().equals(referenceBranchName)) {
+ if (referenceBranchName.equals(getBranchName())) {
throw new IllegalStateException(format("Reference branch set with '%s' points to the current branch '%s'", NEW_CODE_PARAM_KEY, referenceBranchName));
}
return referenceBranchName;