You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/09/08 18:46:13 UTC

[groovy] 02/02: fix for NPE

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

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

commit ac67f86a810bc434c171552601ae862af23269a8
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Wed Sep 8 13:46:00 2021 -0500

    fix for NPE
---
 src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java b/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java
index 25c9296..3facc44 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java
@@ -96,7 +96,7 @@ public abstract class TypeUtil {
     }
 
     public static boolean isPrimitiveType(ClassNode type) {
-        return PRIMITIVE_TYPE_TO_DESCRIPTION_MAP.containsKey(type.redirect());
+        return type != null && PRIMITIVE_TYPE_TO_DESCRIPTION_MAP.containsKey(type.redirect());
     }
 
     public static String getDescriptionByType(ClassNode type) {