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 3547e93  ISIS-1821 fix case of empty annot. list not handled correctly
3547e93 is described below

commit 3547e93031bec9164508380288efa86a16e9d97e
Author: Andi Huber <ahu...@apache.org>
AuthorDate: Mon Jan 15 19:47:28 2018 +0100

    ISIS-1821 fix case of empty annot. list not handled correctly
---
 .../MandatoryFacetInvertedByNullableAnnotationOnParameter.java         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/mandatory/MandatoryFacetInvertedByNullableAnnotationOnParameter.java
 
b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/mandatory/MandatoryFacetInvertedByNullableAnnotationOnParameter.java
index 7dcaf78..a493be5 100644
--- 
a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/mandatory/MandatoryFacetInvertedByNullableAnnotationOnParameter.java
+++ 
b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/mandatory/MandatoryFacetInvertedByNullableAnnotationOnParameter.java
@@ -23,6 +23,7 @@ import java.util.List;
 
 import javax.annotation.Nullable;
 
+import org.apache.isis.core.commons.lang.NullSafe;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.FacetedMethodParameter;
 import 
org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFacet;
@@ -38,7 +39,7 @@ import 
org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFace
 public class MandatoryFacetInvertedByNullableAnnotationOnParameter extends 
MandatoryFacetAbstract {
 
     public static MandatoryFacet create(final List<Nullable> annotation, final 
Class<?> parameterType, final FacetedMethodParameter holder) {
-        if(annotation == null) {
+        if(NullSafe.isEmpty(annotation)) {
             return null;
         }
         if(parameterType.isPrimitive()) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <commits@isis.apache.org>'].

Reply via email to