diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-12 12:06:40 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-12 12:06:40 +0200 |
commit | dd1f7945b12b787c2f2b6726656734d045ae9c8f (patch) | |
tree | 7348b3047559aefdf10eaa3c423a47e4ec0dc912 /sonar-batch | |
parent | 9cbf7d1d02aaf60f6e36ff259305d4474aa68230 (diff) | |
download | sonarqube-dd1f7945b12b787c2f2b6726656734d045ae9c8f.tar.gz sonarqube-dd1f7945b12b787c2f2b6726656734d045ae9c8f.zip |
SONAR-2692 allow ExtensionProvider#provide() to return null
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java index f91054793b8..75dec73bac8 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java @@ -64,12 +64,14 @@ public final class BatchExtensionInstaller implements BatchComponent { List<ExtensionProvider> providers = module.getComponents(ExtensionProvider.class); for (ExtensionProvider provider : providers) { Object obj = provider.provide(); - if (obj instanceof Iterable) { - for (Object extension : (Iterable) obj) { - installExtension(module, extension); + if (obj != null) { + if (obj instanceof Iterable) { + for (Object extension : (Iterable) obj) { + installExtension(module, extension); + } + } else { + installExtension(module, obj); } - } else { - installExtension(module, obj); } } } |