Bug 79635

Summary: NPE when asking an IMethodBinding whether it overrides itself
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2004-11-27 23:09:38 EST
HEAD: NPE when asking an IMethodBinding whether it overrides itself:

java.lang.NullPointerException
	at org.eclipse.jdt.core.dom.MethodBinding.overrides(MethodBinding.java:409)
...
Comment 1 Olivier Thomann CLA 2004-11-29 12:12:40 EST
Jérôme,

It is possible that the compilationUnitResolver on DefaultBindingResolver is null.
To reproduce add this line at the end of test0081 in ASTConverter15Test.
assertFalse("Doesn't override itself", methodBinding.overrides(methodBinding));
Comment 2 Jerome Lanneluc CLA 2004-11-29 16:48:22 EST
Changed DefaultBindingResolver to store the lookup environment instead of the
CompilationUnitResolver.
Added regression test CompatibilityRulesTests#test022()
Comment 3 Frederic Fusier CLA 2004-12-15 06:11:00 EST
Verified for 3.1 M4 using build I200412142000 + ASTView 1.0.2.