| Summary: | Organize Imports buggy in case of Nested Records | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dirk Weissmann <dirweis> | ||||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||||
| Status: | CLOSED MOVED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | peter.metternich, rolf.theunissen, wim.jongman | ||||||
| Version: | 4.13 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 10 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Dirk, Eclipse 4.23 is out today. Please try with this release first and let us know if the problem still exists there. Created attachment 288873 [details]
Simple test project
Wim, retested with the current release 2022-09 and the RC for 2022-12 as well (Version: 2022-12 (4.26.0) - Build id: 20221201-1913).
The issue is still there. To reproduce:
1. Import attached project EclipseBug-579273
2. See the warning "unused import" on Rec.java:3
3. Manually delete line 3 & save
4. Execute Source -> Organize Imports and find the unused import again
The issue tracker has moved. Please file a new issue here: https://github.com/eclipse-jdt/eclipse.jdt.core |
Created attachment 288222 [details] The unnecessary import from the Save Action 'Organize imports' In respect to daily work the severity is rather "critical" but I think "major" will do it in a first try. In case of nested records the 'Organize imports' Save Action creates import lines for the nested records in the parent record that get marked as Warnings since those import statements are useless.