From dd02d56566cb7a2168d017e84807432dba48db06 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 6 May 1999 12:06:56 +0000 Subject: [PATCH] getCastHelper and NULL type git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@792 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/type/ArrayType.java | 2 ++ jode/jode/type/ClassInterfacesType.java | 2 ++ 2 files changed, 4 insertions(+) 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: