| Summary: | compiling package-info.java still depends on the order of compilation units | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||||||
| Component: | Core | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | amj87.iitr, jarthana, martin.von.zweigbergk, Olivier_Thomann, srikanth_sankaran | ||||||||
| Version: | 3.7 | Flags: | Olivier_Thomann:
review+
|
||||||||
| Target Milestone: | 3.7.1 | ||||||||||
| Hardware: | Other | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Stephan Herrmann
Created attachment 201338 [details]
Testcase
Here's the failing test case.
Created attachment 201340 [details]
Same test plus proposed fix
This looks sweet: simply deleting two lines seems to solve the issue:
ClassScope.checkAndSetModifiers() should not call isViewedAsDeprecated()
for member types, because this call originating from
Compiler.beginToCompile() is way too early for requesting another type
(here package-info.java).
This call appears to be unnecessary, too: the same effect is also achieved
later when ASTNode.isTypeUseDeprecated() calls
refType.initializeDeprecatedAnnotationTagBits()
The other calls inside ClassScope.checkAndSetModifiers() are OK because
they only happen later, like during resolve.
I'm currently running test against the patch.
Created attachment 201432 [details]
Same patch with copyright updated
All compiler and model tests passed with this patch.
Released in HEAD for 3.8M2. +1 for this fix in case we want to also release it for 3.7.1 (in order to fix the issue reported in bug 348024). *** Bug 355552 has been marked as a duplicate of this bug. *** (In reply to comment #5) > +1 for this fix in case we want to also release it for 3.7.1 (in order to fix > the issue reported in bug 348024). +1 for 3.7.1, Jay, please take this forward for 3.7.1 Released in 3.7.x maintenance branch for 3.7.1 RC2. Jay, please include fix for RC2 -- Thanks. Verified for 3.7.1 RC2 with build M20110824-0800. Verified for 3.8M2. |