summaryrefslogtreecommitdiffstats
path: root/sonar-deprecated/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-02-11 16:49:44 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2014-02-12 10:50:57 +0100
commit647690e2fc2d73191b018668e0ee7c75b1cc65a8 (patch)
tree950db883267ab305837887862006162f843f3017 /sonar-deprecated/src
parent0c2d8e3e5deb9ddf3299168387d96ba08882a210 (diff)
downloadsonarqube-647690e2fc2d73191b018668e0ee7c75b1cc65a8.tar.gz
sonarqube-647690e2fc2d73191b018668e0ee7c75b1cc65a8.zip
SONAR-926 No more call shouldExecuteOnProject on extensions that declare DependsUponMavenPlugin
to avoid unecessary access to the filesystem by JacocoMavenInitializer
Diffstat (limited to 'sonar-deprecated/src')
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java7
1 files changed, 6 insertions, 1 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 bc88a95116d..1c6a3c73158 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
@@ -65,7 +65,12 @@ public class BatchExtensionDictionnary {
}
public Collection<MavenPluginHandler> selectMavenPluginHandlers(Project project) {
- Collection<DependsUponMavenPlugin> selectedExtensions = select(DependsUponMavenPlugin.class, project, true);
+ List<DependsUponMavenPlugin> selectedExtensions = Lists.newArrayList();
+ for (BatchExtension extension : getExtensions()) {
+ if (ClassUtils.isAssignable(extension.getClass(), DependsUponMavenPlugin.class)) {
+ selectedExtensions.add((DependsUponMavenPlugin) extension);
+ }
+ }
List<MavenPluginHandler> handlers = Lists.newArrayList();
for (DependsUponMavenPlugin extension : selectedExtensions) {
MavenPluginHandler handler = extension.getMavenPluginHandler(project);