diff --git a/com.ibm.wala.core/src/com/ibm/wala/classLoader/Language.java b/com.ibm.wala.core/src/com/ibm/wala/classLoader/Language.java index 284a8cd61..64d278caf 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/classLoader/Language.java +++ b/com.ibm.wala.core/src/com/ibm/wala/classLoader/Language.java @@ -17,6 +17,10 @@ public interface Language { return TypeReference.JavaLangObject; } + public TypeReference getThrowableType() { + return TypeReference.JavaLangThrowable; + } + public TypeReference getConstantType(Object o) { if (o instanceof String) { return TypeReference.JavaLangString; @@ -43,6 +47,8 @@ public interface Language { TypeReference getRootType(); + TypeReference getThrowableType(); + TypeReference getConstantType(Object o); boolean isNullType(TypeReference type); diff --git a/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java b/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java index 2371edb45..7c04254f6 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java +++ b/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java @@ -334,7 +334,9 @@ public abstract class SSAPropagationCallGraphBuilder extends PropagationCallGrap List peis = getIncomingPEIs(ir, ir.getExitBlock()); PointerKey exception = getPointerKeyForExceptionalReturnValue(node); - IClass c = node.getClassHierarchy().lookupClass(TypeReference.JavaLangThrowable); + TypeReference throwableType = + node.getMethod().getDeclaringClass().getClassLoader().getLanguage().getThrowableType(); + IClass c = node.getClassHierarchy().lookupClass(throwableType); addExceptionDefConstraints(ir, du, node, peis, exception, Collections.singleton(c)); }