From ea660b1b652e86820c693f9f5a1db75d1a05a078 Mon Sep 17 00:00:00 2001 From: Zipeng WU Date: Fri, 4 Feb 2022 09:50:06 +0100 Subject: Fix bugs from Quality Gate --- .../main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java') diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java index d1d605f42c8..8320fa8a3fc 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java @@ -127,6 +127,7 @@ import org.sonar.scanner.sensor.ProjectSensorsExecutor; import org.sonar.scm.git.GitScmSupport; import org.sonar.scm.svn.SvnScmSupport; +import static org.sonar.api.utils.Preconditions.checkNotNull; import static org.sonar.api.batch.InstantiationStrategy.PER_BATCH; import static org.sonar.core.extension.CoreExtensionsInstaller.noExtensionFilter; import static org.sonar.scanner.bootstrap.ExtensionUtils.isDeprecatedScannerSide; @@ -298,6 +299,7 @@ public class SpringProjectScanContainer extends SpringComponentContainer { } private void addScannerExtensions() { + checkNotNull(getParent()); getParent().getComponentByType(CoreExtensionsInstaller.class) .install(this, noExtensionFilter(), extension -> getScannerProjectExtensionsFilter().accept(extension)); getParent().getComponentByType(ExtensionInstaller.class) -- cgit v1.2.3