This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 5b9720c2bd4fb1e9e51f125ef11bf610b3fb5295
Author: danhaywood <d...@haywood-associates.co.uk>
AuthorDate: Sat Nov 9 12:30:12 2019 +0000

    ISIS-2174: simplifies ModuleService
    
    ... return module dependencies in a map, not a list.
---
 .../extensions/fixtures/module/ModuleService.java     | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git 
a/extensions/fixtures/src/main/java/org/apache/isis/extensions/fixtures/module/ModuleService.java
 
b/extensions/fixtures/src/main/java/org/apache/isis/extensions/fixtures/module/ModuleService.java
index 4862c88..52e42cf 100644
--- 
a/extensions/fixtures/src/main/java/org/apache/isis/extensions/fixtures/module/ModuleService.java
+++ 
b/extensions/fixtures/src/main/java/org/apache/isis/extensions/fixtures/module/ModuleService.java
@@ -67,22 +67,6 @@ public class ModuleService {
                     final Object annotatedWithConfiguration = 
configurationBeansByBeanName.get(beanName);
                     final Object annotatedWithImport = 
beansAnnotatedWithImportByBeanName.get(beanName);
 
-                    final List<Module> importedModules;
-                    if(annotatedWithConfiguration != null && 
annotatedWithImport != null) {
-
-                        final Import importAnnot = 
Annotations.getAnnotation(annotatedWithImport.getClass(), Import.class);
-                        final Class<?>[] importedClasses = importAnnot.value();
-
-                        importedModules = Arrays.stream(importedClasses)
-                                .map(importedClass -> 
context.getBeansOfType(importedClass).values())
-                                .flatMap(Collection::stream)
-                                .filter(Module.class::isInstance)
-                                .map(Module.class::cast)
-                                .collect(Collectors.toList());
-                    } else {
-                        importedModules = Collections.emptyList();
-                    }
-
                     final Map<String, Module> importedModulesByBeanName = new 
LinkedHashMap<>();
                     if(annotatedWithConfiguration != null && 
annotatedWithImport != null) {
 
@@ -107,7 +91,7 @@ public class ModuleService {
                                 });
                     }
 
-                    final ModuleDescriptor moduleDescriptor = new 
ModuleDescriptor(contextId, beanName, module, importedModules, 
importedModulesByBeanName);
+                    final ModuleDescriptor moduleDescriptor = new 
ModuleDescriptor(contextId, beanName, module, importedModulesByBeanName);
                     moduleDescriptors.add(moduleDescriptor);
                 }
             }
@@ -129,7 +113,6 @@ public class ModuleService {
         private final String contextId;
         private final String beanName;
         private final Module module;
-        private final List<Module> moduleDependencies;
         private final Map<String,Module> dependenciesByName;
 
         @Override

Reply via email to