Bug 12007 - Source folder ending with .jar considered as JAR archive
Summary: Source folder ending with .jar considered as JAR archive
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-21 05:35 EST by Jerome Lanneluc CLA
Modified: 2002-04-08 10:32 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 Jerome Lanneluc CLA 2002-03-21 05:35:35 EST
Build 20020319

1. Create source folder 'src.jar' in project 'Test'
2. Select this source folder
3. New->Package
4. Enter 'p'
Observe: An error message says that 'Test/src.jar' is a JAR archive
Comment 1 Martin Aeschlimann CLA 2002-03-29 10:02:43 EST
validation uses IPackageFragmentRoot.isArchive() which returns true even this 
is a source folder

move to jcore
Comment 2 Philipe Mulet CLA 2002-04-02 02:44:20 EST
I believe the JavaModel is also often checking the path termination as well, as 
opposed to a systematic file/resource access.
Comment 3 Jerome Lanneluc CLA 2002-04-08 10:32:09 EDT
Fixed by checking if the type of the resource is a FILE when the jar package 
fragment root is created. If it is a FOLDER, a regular root is created even if 
the resource name ends with .jar.