WALA: Nullpointerexception in JDTJava2CAstTranslator
Hello,
I’m trying to create a call graph but encounter a null pointer exception. Depending on the java source I use as input the exception is thrown from different visitors, but it always involves “n.resolveMethodBinding()”.
resolveMethodBinding returns null because it uses the class BindingResolver’s implementation (org.eclipse.jdt.core.dom package) (line 194):
IMethodBinding resolveMethod(MethodInvocation method) {
return null;
}
It is likely that DefaultBindingResolver should be used instead of BindingResolver’s which features an empty implementation for each method.
The exact same issue was described by someone else here: https://sourceforge.net/p/wala/mailman/message/34746738/
Hope you have any clue how to solve this issue, as I’m using this tool for research done with regard to my thesis.
Best regards, Edward
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 1
- Comments: 52 (19 by maintainers)
@edwardmp I am facing the same (original) problem that @msridhar posted in this thread. In fact, I am getting exactly the same stacktrace of the null pointer exception.
The problem, surprise surprise, is that
resolveMethodBinding()is returning null. It is caused by the invocation of a method in a class in a JAR file included in my project. So far, I have tried the following solutions without success:rt.jar) are includedAll other bindings seem to be working fine (even those with invocations of other methods in the same class) and I have no clue why this specific one is failing. Do you have any idea what might be causing it?