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
The following commit(s) were added to refs/heads/dev/2.0.0-M2 by this push: new a90d651 ISIS-1841 remove unnecessary null-check + simplify a90d651 is described below commit a90d651cc1a9ad99de8c55896c910ee9fa78580d 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.