From: Julien HENRY Date: Tue, 22 Jul 2014 07:05:04 +0000 (+0200) Subject: SONAR-5389 Fix issue after renaming of Analyzer -> Sensor X-Git-Tag: 4.5-RC1~447 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=830070e4f0514ab67d408755090890f382cd368f;p=sonarqube.git SONAR-5389 Fix issue after renaming of Analyzer -> Sensor --- diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java index fdbdc536eaf..7317c9afd08 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java @@ -67,7 +67,7 @@ public class BatchExtensionDictionnary extends org.sonar.api.batch.BatchExtensio } } if (org.sonar.api.batch.Sensor.class.equals(type)) { - // Retrieve Analyzer and wrap then in SensorWrapper + // Retrieve new Sensors and wrap then in SensorWrapper for (Object extension : getExtensions(Sensor.class)) { extension = new SensorWrapper((Sensor) extension, context, analyzerOptimizer); if (shouldKeep(type, extension, project, matcher)) { @@ -80,7 +80,7 @@ public class BatchExtensionDictionnary extends org.sonar.api.batch.BatchExtensio private boolean shouldKeep(Class type, Object extension, @Nullable Project project, @Nullable ExtensionMatcher matcher) { boolean keep = (ClassUtils.isAssignable(extension.getClass(), type) - || (Sensor.class.equals(type) && ClassUtils.isAssignable(extension.getClass(), Sensor.class))) + || (org.sonar.api.batch.Sensor.class.equals(type) && ClassUtils.isAssignable(extension.getClass(), Sensor.class))) && (matcher == null || matcher.accept(extension)); if (keep && project != null && ClassUtils.isAssignable(extension.getClass(), CheckProject.class)) { keep = ((CheckProject) extension).shouldExecuteOnProject(project);