Bug 25041 - IJavaElement#getUnderlyingResource - should fail if element doesn't exist
Summary: IJavaElement#getUnderlyingResource - should fail if element doesn't exist
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-18 07:15 EDT by Philipe Mulet CLA
Modified: 2002-11-13 11:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.