diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-06-18 11:41:59 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-06-18 16:26:00 +0200 |
commit | 1e39cf737eed643f1aaed340fce5696eb760a7d8 (patch) | |
tree | f5f3763d04d45f3b0708c935a92b9c0cdd025167 /sonar-deprecated/src | |
parent | f3ce69889f1a33e07d81ba20e052eebe599a03bc (diff) | |
download | sonarqube-1e39cf737eed643f1aaed340fce5696eb760a7d8.tar.gz sonarqube-1e39cf737eed643f1aaed340fce5696eb760a7d8.zip |
SONAR-5389 Drop batch-api module
Diffstat (limited to 'sonar-deprecated/src')
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java index c951512e8f6..0e83d92f0be 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java @@ -24,13 +24,14 @@ import com.google.common.collect.Collections2; import com.google.common.collect.Lists; import org.apache.commons.lang.ClassUtils; import org.sonar.api.BatchExtension; +import org.sonar.api.batch.analyzer.Analyzer; +import org.sonar.api.batch.analyzer.internal.DefaultAnalyzerDescriptor; import org.sonar.api.batch.maven.DependsUponMavenPlugin; import org.sonar.api.batch.maven.MavenPluginHandler; import org.sonar.api.platform.ComponentContainer; import org.sonar.api.resources.Project; import org.sonar.api.utils.AnnotationUtils; import org.sonar.api.utils.dag.DirectAcyclicGraph; -import org.sonar.batch.api.analyzer.Analyzer; import java.lang.annotation.Annotation; import java.lang.reflect.Array; @@ -99,7 +100,6 @@ public class BatchExtensionDictionnary { private static void completeBatchExtensions(ComponentContainer container, List<Object> extensions) { if (container != null) { extensions.addAll(container.getComponentsByType(BatchExtension.class)); - extensions.addAll(container.getComponentsByType(org.sonar.batch.api.BatchExtension.class)); completeBatchExtensions(container.getParent(), extensions); } } @@ -147,7 +147,9 @@ public class BatchExtensionDictionnary { List<Object> result = new ArrayList<Object>(); result.addAll(evaluateAnnotatedClasses(extension, DependsUpon.class)); if (ClassUtils.isAssignable(extension.getClass(), Analyzer.class)) { - result.addAll(Arrays.asList(((Analyzer) extension).describe().dependsOn())); + DefaultAnalyzerDescriptor descriptor = new DefaultAnalyzerDescriptor(); + ((Analyzer) extension).describe(descriptor); + result.addAll(Arrays.asList(descriptor.dependsOn())); } return result; } @@ -159,7 +161,9 @@ public class BatchExtensionDictionnary { List<Object> result = new ArrayList<Object>(); result.addAll(evaluateAnnotatedClasses(extension, DependedUpon.class)); if (ClassUtils.isAssignable(extension.getClass(), Analyzer.class)) { - result.addAll(Arrays.asList(((Analyzer) extension).describe().provides())); + DefaultAnalyzerDescriptor descriptor = new DefaultAnalyzerDescriptor(); + ((Analyzer) extension).describe(descriptor); + result.addAll(Arrays.asList(descriptor.provides())); } return result; } |