From 9ad1a4df47e9d008581968c6f458a94f47a68375 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Mon, 23 Sep 2013 23:43:13 +0000 Subject: [PATCH] null-guard git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1525740 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java index 1e20f5c10..3daeee1b0 100644 --- a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java +++ b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java @@ -24,6 +24,7 @@ import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -1261,6 +1262,9 @@ public class TypeUtils { * @return Type */ public static Type unrollVariables(Map, Type> typeArguments, final Type type) { + if (typeArguments == null) { + typeArguments = Collections., Type> emptyMap(); + } if (containsTypeVariables(type)) { if (type instanceof TypeVariable) { return unrollVariables(typeArguments, typeArguments.get(type));