diff options
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap')
2 files changed, 4 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionnary.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionnary.java index d4733375ba8..240c2c4da65 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionnary.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionnary.java @@ -64,9 +64,9 @@ public abstract class AbstractExtensionDictionnary { protected <T> List<T> getFilteredExtensions(Class<T> type, @Nullable ExtensionMatcher matcher) { List<T> result = new ArrayList<>(); - for (Object extension : getExtensions(type)) { + for (T extension : getExtensions(type)) { if (shouldKeep(type, extension, matcher)) { - result.add((T) extension); + result.add(extension); } } return result; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java index d5487c990ca..e9005b92353 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java @@ -25,6 +25,7 @@ import java.util.List; import org.sonar.core.component.DefaultResourceTypes; import org.sonar.core.config.CorePropertyDefinitions; import org.sonar.core.issue.tracking.Tracker; +import org.sonar.scanner.cpd.JavaCpdBlockIndexerSensor; import org.sonar.scanner.externalissue.ExternalIssuesImportSensor; import org.sonar.scanner.genericcoverage.GenericCoverageSensor; import org.sonar.scanner.genericcoverage.GenericTestExecutionSensor; @@ -44,6 +45,7 @@ public class BatchComponents { components.addAll(CorePropertyDefinitions.all()); if (!analysisMode.isIssues()) { components.add(ZeroCoverageSensor.class); + components.add(JavaCpdBlockIndexerSensor.class); // Generic coverage components.add(GenericCoverageSensor.class); |