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 2020/01/19 16:16:08 UTC

[isis] 03/07: ISIS-2223: add missing null guard

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

commit 78d4f98135b618db2498834af58a830fc4f85458
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Jan 19 16:59:15 2020 +0100

    ISIS-2223: add missing null guard
---
 .../apache/isis/core/commons/internal/collections/_Collections.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/commons/src/main/java/org/apache/isis/core/commons/internal/collections/_Collections.java b/core/commons/src/main/java/org/apache/isis/core/commons/internal/collections/_Collections.java
index 6ae98e0..fea05ec 100644
--- a/core/commons/src/main/java/org/apache/isis/core/commons/internal/collections/_Collections.java
+++ b/core/commons/src/main/java/org/apache/isis/core/commons/internal/collections/_Collections.java
@@ -304,6 +304,9 @@ public final class _Collections {
      * @return inferred type or null if inference fails
      */
     public static @Nullable Class<?> inferElementTypeIfAny(@Nullable final Field field) {
+        if(field==null) {
+            return null;
+        }
         return inferElementTypeIfAny(field.getType(), field.getGenericType());
     }