]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21195 Move ProjectSensorOptimizer to the correct container
authorMatteo Mara <matteo.mara@sonarsource.com>
Fri, 19 Jan 2024 08:13:13 +0000 (09:13 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 19 Jan 2024 20:02:55 +0000 (20:02 +0000)
sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java

index ee7abecf16502b661acc78d860c67fbc7815bb03..1e0fbf0c2e50ef88c9c0e55c588fb1cc0ea1ff1d 100644 (file)
@@ -24,7 +24,6 @@ import javax.annotation.Priority;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.batch.fs.internal.FileMetadata;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
 import org.sonar.api.batch.rule.CheckFactory;
 import org.sonar.api.batch.sensor.issue.internal.DefaultNoSonarFilter;
 import org.sonar.api.scan.filesystem.PathResolver;
@@ -131,7 +130,6 @@ import org.sonar.scanner.scm.ScmRevisionImpl;
 import org.sonar.scanner.sensor.DefaultSensorStorage;
 import org.sonar.scanner.sensor.ExecutingSensorContext;
 import org.sonar.scanner.sensor.ProjectSensorContext;
-import org.sonar.scanner.sensor.ProjectSensorOptimizer;
 import org.sonar.scanner.sensor.UnchangedFilesHandler;
 import org.sonar.scm.git.GitScmSupport;
 import org.sonar.scm.svn.SvnScmSupport;
@@ -224,8 +222,6 @@ public class SpringScannerContainer extends SpringComponentContainer {
       // context
       ContextPropertiesCache.class,
 
-      SensorStrategy.class,
-
       MutableProjectSettings.class,
       SonarGlobalPropertiesFilter.class,
       ProjectConfigurationProvider.class,
@@ -270,7 +266,6 @@ public class SpringScannerContainer extends SpringComponentContainer {
       DefaultSensorStorage.class,
       DefaultFileLinesContextFactory.class,
       ProjectSensorContext.class,
-      ProjectSensorOptimizer.class,
       ExecutingSensorContext.class,
 
       UnchangedFilesHandler.class,
index 9aeb99829822c8c922087fc51de32d11be5b8e9f..f14fb610482fb6a07f7a098d58bb0c3837e14ca5 100644 (file)
@@ -28,6 +28,7 @@ import org.sonar.api.Plugin;
 import org.sonar.api.batch.bootstrap.ProjectBuilder;
 import org.sonar.api.batch.bootstrap.ProjectReactor;
 import org.sonar.api.batch.fs.internal.DefaultInputModule;
+import org.sonar.api.batch.fs.internal.SensorStrategy;
 import org.sonar.api.measures.Metrics;
 import org.sonar.api.resources.Languages;
 import org.sonar.api.resources.ResourceTypes;
@@ -56,6 +57,7 @@ import org.sonar.scanner.scan.filesystem.LanguageDetection;
 import org.sonar.scanner.scan.filesystem.ProjectFileIndexer;
 import org.sonar.scanner.scm.ScmPublisher;
 import org.sonar.scanner.sensor.ProjectSensorExtensionDictionary;
+import org.sonar.scanner.sensor.ProjectSensorOptimizer;
 import org.sonar.scanner.sensor.ProjectSensorsExecutor;
 
 import static org.sonar.api.batch.InstantiationStrategy.PER_BATCH;
@@ -115,8 +117,10 @@ public class SpringProjectScanContainer extends SpringComponentContainer {
       PostJobExtensionDictionary.class,
 
       // Sensors
+      SensorStrategy.class,
       ProjectSensorExtensionDictionary.class,
       ProjectSensorsExecutor.class,
+      ProjectSensorOptimizer.class,
 
       AnalysisObservers.class,