Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 561572

Summary: NPE in TypeBinding.genericCast() in JDT compiler
Product: [Eclipse Project] JDT Reporter: Hendrik Brummermann <nhb_web>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mclaren
Version: 4.15   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Hendrik Brummermann CLA 2020-03-30 05:21:05 EDT
After updating to Eclipse 2020.03, compiling our large Java project fails. 

"The project was not built since its build path is incomplete. Cannot find the class file for xxx. Fix the build path then try building this project" and "The type Xxx cannot be resolved. It is indirectly referenced from required .class files xxx.java"

The file in question changes on a repeated "Project|clean". 

The project makes use of a custom classpath container, but in all cases the missing files exist within the same project.


java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.lookup.TypeBinding.genericCast(TypeBinding.java:492)
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.computeConversion(MessageSend.java:461)
	at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:392)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:320)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1293)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1418)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:666)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:901)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:145)
	at java.lang.Thread.run(Thread.java:748)
Comment 1 Eclipse Genie CLA 2022-05-03 17:50:27 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Hendrik Brummermann CLA 2022-05-03 18:33:30 EDT
I cannot reproduce the issue since 2020.09.