diff --git a/jode/jode/type/ArrayType.java b/jode/jode/type/ArrayType.java index 42a51cc..221a20b 100644 --- a/jode/jode/type/ArrayType.java +++ b/jode/jode/type/ArrayType.java @@ -175,6 +175,8 @@ public class ArrayType extends ReferenceType { * @return the middle type, or null if it is not necessary. */ public Type getCastHelper(Type fromType) { + if (fromType.getTypeCode() == TC_NULL) + return this; Type hintType = fromType.getHint(); switch (hintType.getTypeCode()) { case TC_ARRAY: diff --git a/jode/jode/type/ClassInterfacesType.java b/jode/jode/type/ClassInterfacesType.java index 0261ae7..8e08c3c 100644 --- a/jode/jode/type/ClassInterfacesType.java +++ b/jode/jode/type/ClassInterfacesType.java @@ -435,6 +435,8 @@ public class ClassInterfacesType extends ReferenceType { * @return the middle type, or null if it is not necessary. */ public Type getCastHelper(Type fromType) { + if (fromType.getTypeCode() == TC_NULL) + return this; Type hintType = fromType.getHint(); switch (hintType.getTypeCode()) { case TC_ARRAY: