Bug 22942 - JavaProject.exists returns true when it should not
Summary: JavaProject.exists returns true when it should not
Status: RESOLVED DUPLICATE of bug 22517
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   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-28 09:26 EDT by Aldo Eisma CLA
Modified: 2002-08-30 08:17 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aldo Eisma CLA 2002-08-28 09:26:20 EDT
JavaProject.exists() returns true where it should have returned false.
This is the code fragment:

IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject("XXX");
fJavaProject = JavaCore.create(p);
p.exists(); // Returns false
fJavaProject.exists(); // Returns true when directory \XXX exists on filesystem!

This is because JavaModel.getTarget checks for the existence of an external 
file when it does not find a resource by the given name.
Comment 1 Jerome Lanneluc CLA 2002-08-30 08:17:22 EDT

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