Bug 25041

Summary: IJavaElement#getUnderlyingResource - should fail if element doesn't exist
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2002-10-18 07:15:46 EDT
Build 20021016

The spec states that a non-existing element should not be able to provide its 
underlyingResource. 

The implementation will always answer back the resource if there is one (e.g. 
it will not check that the element is on the project CP).
Comment 1 Erich Gamma CLA 2002-10-19 16:13:29 EDT
I assume the same should be true for getCorrespondingResource().
Comment 2 Jerome Lanneluc CLA 2002-10-21 09:37:12 EDT
Fixed getUnderlyingResource() and getCorrespondingResource() for all java 
elements.
Added regression tests in ExistenceTest.
Comment 3 David Audel CLA 2002-11-13 11:02:06 EST
Verified.