Summary: | [compiler] generates error on missing package statement and assumes package based on source directory path | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Meyer Franklin <franklinm> | ||||
Component: | Core | Assignee: | Maxime Daniel <maxime_daniel> | ||||
Status: | RESOLVED WONTFIX | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.1.1 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows 2000 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Meyer Franklin
2005-12-06 11:41:15 EST
Could you please provide a test case? Created attachment 31217 [details] test case to reproduce the bug as described Please find attachment bug119440.zip. This contains a test project which demonstrates the bug as described. On Eclipse 3.2 M3, the message reads 'The declared package "" does not match the expected package "com.mycorp.util"', which, in my opinion, clearly states what Eclipse complains about. Regarding how Eclipse decides which package a compilation units belongs to, I would contend that JLS 3 7.2.1 leaves plenty of room to tools, and that Eclipse's choice is acceptable. In other words, the spec explicitly states that tools will have to make choices within a space that have few documented constraints. Both Eclipse and javac have made choices. These choices happen to be different, to have each merits of its own, and to be both compatible with the spec. This bug could then possibly trigger an enhancement request, but this is not a problem per se. |