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

ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit ca1ea6673b99dd7a592a55879e09bb1b792a58f0
Author: Andi Huber <ahu...@apache.org>
AuthorDate: Mon Feb 19 15:07:25 2018 +0100

    ISIS-1841 remove unnecessary null-check + simplify
    
    Note: _Reflect (Internal API) guarantees discovered classes to be non-null
---
 .../systemusinginstallers/IsisComponentProvider.java     | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git 
a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
 
b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index 941c6e8..d6a6a14 100644
--- 
a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ 
b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -144,16 +144,12 @@ public abstract class IsisComponentProvider {
         mixinTypes.addAll(discovery.getTypesAnnotatedWith(Mixin.class));
 
         final Set<Class<?>> domainObjectTypes = 
discovery.getTypesAnnotatedWith(DomainObject.class);
-        mixinTypes.addAll(
-                domainObjectTypes.stream().filter(input -> {
-                    if (input == null) {
-                        return false;
-                    }
-                    final DomainObject annotation = 
input.getAnnotation(DomainObject.class);
-                    return annotation.nature() == Nature.MIXIN;
-                }).collect(Collectors.toList())
-        );
-        
+        domainObjectTypes.stream()
+        .filter(input -> {
+            final DomainObject annotation = 
input.getAnnotation(DomainObject.class);
+            return annotation.nature() == Nature.MIXIN;
+        })
+        .forEach(mixinTypes::add);
         
         // add in any explicitly registered services...
         domainServiceTypes.addAll(appManifest.getAdditionalServices());

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

Reply via email to