You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/05/31 16:11:40 UTC

[isis] branch master updated: ISIS-1958: improve code readability

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e0aa6b6  ISIS-1958: improve code readability
e0aa6b6 is described below

commit e0aa6b6577d3d9c3b6b044c856a0eaaabe17e24d
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu May 31 18:11:36 2018 +0200

    ISIS-1958: improve code readability
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1958
---
 .../main/java/org/apache/isis/applib/Module.java   | 36 ++++++++++++----------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/Module.java b/core/applib/src/main/java/org/apache/isis/applib/Module.java
index 91b6ec7..928100c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/Module.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/Module.java
@@ -18,14 +18,13 @@
  */
 package org.apache.isis.applib;
 
-import static org.apache.isis.commons.internal.base._With.accept;
-import static org.apache.isis.commons.internal.collections._Lists.newArrayList;
 import static org.apache.isis.commons.internal.collections._Maps.newLinkedHashMap;
 
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.fixturescripts.FixtureScript;
@@ -211,27 +210,30 @@ public interface Module {
         }
 
         static Map<String, String> transitiveIndividualConfigPropsOf(final Module module) {
-        	return accept(newLinkedHashMap(), props->{
-        		transitiveDependenciesOf(module).stream()
-            	.map(Module::getIndividualConfigProps)
-            	.forEach(props::putAll);
-        	});
+        	final Map<String, String> props = newLinkedHashMap();
+        			
+    		transitiveDependenciesOf(module).stream()
+        	.map(Module::getIndividualConfigProps)
+        	.forEach(props::putAll);
+        	
+        	return props;
         }
         
         static Map<String, String> transitiveFallbackConfigPropsOf(final Module module) {
-        	return accept(newLinkedHashMap(), props->{
-        		transitiveDependenciesOf(module).stream()
-            	.map(Module::getFallbackConfigProps)
-            	.forEach(props::putAll);
-        	});
+        	final Map<String, String> props = newLinkedHashMap();
+			
+    		transitiveDependenciesOf(module).stream()
+        	.map(Module::getFallbackConfigProps)
+        	.forEach(props::putAll);
+        	
+        	return props;
         }
 
         static List<PropertyResource> transitivePropertyResourcesOf(final Module module) {
-        	return accept(newArrayList(), resources->{
-        		transitiveDependenciesOf(module).stream()
-            	.map(Module::getPropertyResources)
-            	.forEach(resources::addAll);
-        	});
+        	return transitiveDependenciesOf(module).stream()
+        		.map(Module::getPropertyResources)
+            	.flatMap(List::stream)
+            	.collect(Collectors.toList());
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
ahuber@apache.org.