Skip to content

Commit

Permalink
Protect against NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Aug 10, 2010
1 parent b7195fc commit 7f01b0b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion impl/src/main/java/org/jboss/weld/util/reflection/Formats.java
Expand Up @@ -117,7 +117,15 @@ public static String formatType(Type baseType)
}
else
{
return Reflections.getRawType(baseType).getSimpleName() + formatActualTypeArguments(Reflections.getActualTypeArguments(baseType));
Class<?> rawType = Reflections.getRawType(baseType);
if (rawType != null)
{
return rawType.getSimpleName() + formatActualTypeArguments(Reflections.getActualTypeArguments(baseType));
}
else
{
return baseType.toString();
}
}
}

Expand Down

0 comments on commit 7f01b0b

Please sign in to comment.