Bug 29404

Summary: JavaCore.create(IProject) returns != null for non Java Projects.
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2003-01-13 12:37:45 EST
Build I20030107

- create a non Java Project
- create a Java project using the following code
  IJavaProject project= JavaCore.create(IProject).
  observe: this returns an instance
- call project.exists()
  observe: this returns true.

What is the correct way to figure out that this is not a Java project. Should 
create return null in this case
Comment 1 Philipe Mulet CLA 2003-01-14 04:53:17 EST
No, you can always create handle onto non-existing entities. However, the 
existency check is suspicious.
Comment 2 Jerome Lanneluc CLA 2003-01-14 04:58:44 EST
project.exists() should return false

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