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

Bug 520832

Summary: NPE in Annotation.isTypeUseCompatible(...)
Product: [Eclipse Project] JDT Reporter: Ivan Ivan <stoshins>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 4.8   
Target Milestone: 4.8 M5   
Hardware: PC   
OS: Windows NT   
Whiteboard: To be verified for 4.8 M6
Attachments:
Description Flags
Sources which occur the bug
none
Use it to build ASTs none

Description Ivan Ivan CLA 2017-08-10 07:57:27 EDT
Created attachment 269782 [details]
Sources which occur the bug

Full start trace:
	at org.eclipse.jdt.internal.compiler.ast.Annotation.isTypeUseCompatible(Annotation.java:1249)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:1787)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:931)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:900)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:904)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:896)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:452)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:860)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1006)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:630)
	at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:993)
	at test.Main2.main(Main2.java:56)

Use Main2.java to build sources
Comment 1 Ivan Ivan CLA 2017-08-10 07:58:26 EDT
Created attachment 269783 [details]
Use it to build ASTs
Comment 2 Stephan Herrmann CLA 2018-02-22 07:37:43 EST
Thanks, I can reproduce NPE in M4 and no NPE in HEAD due to the fix from bug 490698.

*** This bug has been marked as a duplicate of bug 490698 ***