aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap
diff options
context:
space:
mode:
authorJulien Camus <julien.camus@sonarsource.com>2024-12-27 15:22:10 +0100
committersonartech <sonartech@sonarsource.com>2024-12-27 20:03:07 +0000
commit643821403bceec551ad5305d80fd43bc63895e4f (patch)
treeb5523e048ea76741412391be28a6625369afdf76 /sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap
parent670f4a2337ceeb3cce78cbff249a5b3ba6f3e319 (diff)
downloadsonarqube-643821403bceec551ad5305d80fd43bc63895e4f.tar.gz
sonarqube-643821403bceec551ad5305d80fd43bc63895e4f.zip
SONAR-24021 Invoke method(s) only conditionally
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java15
2 files changed, 12 insertions, 9 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
index a6193218f31..782eaa9364a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
@@ -19,10 +19,10 @@
*/
package org.sonar.scanner.bootstrap;
+import jakarta.annotation.Priority;
import java.time.Clock;
import java.util.List;
import java.util.Map;
-import jakarta.annotation.Priority;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -141,7 +141,9 @@ public class SpringGlobalContainer extends SpringComponentContainer {
}
new SpringScannerContainer(this).execute();
- LOG.info("Analysis total time: {}", formatTime(System.currentTimeMillis() - startTime));
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Analysis total time: {}", formatTime(System.currentTimeMillis() - startTime));
+ }
}
private void installRequiredPlugins() {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java
index c368316f7fb..a0df8c926ed 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java
@@ -19,8 +19,8 @@
*/
package org.sonar.scanner.bootstrap;
-import javax.annotation.Nullable;
import jakarta.annotation.Priority;
+import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.batch.fs.internal.FileMetadata;
@@ -160,10 +160,12 @@ public class SpringScannerContainer extends SpringComponentContainer {
private void addSuffixesDeprecatedProperties() {
add(
- /* This is needed to support properly the deprecated sonar.rpg.suffixes property when the download optimization feature is enabled.
- The value of the property is needed at the preprocessing stage, but being defined by an optional analyzer means that at preprocessing
- it won't be properly available. This will be removed in SQ 11.0 together with the drop of the property from the rpg analyzer.
- See SONAR-21514 */
+ /*
+ * This is needed to support properly the deprecated sonar.rpg.suffixes property when the download optimization feature is enabled.
+ * The value of the property is needed at the preprocessing stage, but being defined by an optional analyzer means that at preprocessing
+ * it won't be properly available. This will be removed in SQ 11.0 together with the drop of the property from the rpg analyzer.
+ * See SONAR-21514
+ */
PropertyDefinition.builder("sonar.rpg.file.suffixes")
.deprecatedKey("sonar.rpg.suffixes")
.multiValues(true)
@@ -308,8 +310,7 @@ public class SpringScannerContainer extends SpringComponentContainer {
GitlabCi.class,
Jenkins.class,
SemaphoreCi.class,
- TravisCi.class
- );
+ TravisCi.class);
add(GitScmSupport.getObjects());
add(SvnScmSupport.getObjects());