NullPointerException from Eclipse compiler

I am getting the following message from my Eclipse compiler and my project won't compile ....

Internal compiler error: java.lang.NullPointerException in org.eclipse.jdt.internal.compiler.problem.ProblemReporter.missingTypeInMethod (ProblemReporter.java:5075)

I've tried updating Eclipse, restarting eclipse, closing and opening a project, refreshing, cleaning / restoring, etc. I have no idea.

+2


source to share


2 answers


It seems like bug 250297 , fixed in eclipse 3.4.2. Also fixed in 3.5 (M4, Nov 2008, as mentioned in this JDT release note )

The crash occurs at the line (→>):

public void missingTypeInMethod(MessageSend messageSend, MethodBinding method)
{
    List missingTypes = method.collectMissingTypes(null);
>>> TypeBinding missingType = (TypeBinding) missingTypes.get(0);

      



This indicates that although we have identified the missing type (with which we are trying to file a complaint), we are unable to find it inside the method signature ...


So ... if you are using a "older" version of eclipse (like 3.4 or 3.4.1), a good solution is to upgrade (that is, install a new fresh version of eclipse, 3.4.2 or 3.5.1) while reusing the same the same workspace.
The error should be gone.

+1


source


I had this problem back in Eclipse Luna (4.4). The only way to get rid of it is to upgrade to Eclipse Mars (4.5.0). I don't know if this is relevant to the problem, but I upgraded to java 8 shortly before the problem occurred. NTN.



0


source







All Articles