This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218985 - Broken "Imports -> Organize imports" hint
Summary: Broken "Imports -> Organize imports" hint
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 13:48 UTC by unai
Modified: 2012-12-03 16:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
step1 (8.88 KB, image/png)
2012-09-25 13:49 UTC, unai
Details
step2 (7.66 KB, image/png)
2012-09-25 13:49 UTC, unai
Details
step3 (7.22 KB, image/png)
2012-09-25 13:49 UTC, unai
Details
step4 (6.92 KB, image/png)
2012-09-25 13:49 UTC, unai
Details
step5 (8.32 KB, image/png)
2012-09-25 13:50 UTC, unai
Details
options (14.23 KB, image/png)
2012-09-25 13:50 UTC, unai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description unai 2012-09-25 13:48:19 UTC
[ JDK VERSION : 1.7.7 ]

There's a circularity where a hint suggests a refactoring that leads you to a 
condition where another hint suggests a refactoring that brings you back to 
initial condition.

No funky import rules (default + grouping).

If you import a static nested class (which you use in your code) and you also 
statically star-import the parent class, the hint shows up saying that it's 
"never used". If you refactor, it gets removed, but then it says it doesn't 
adhere to import rules. If you refactor again, there you are at square one.

Please see attached screenshots for a much clearer visual explanation.
Comment 1 unai 2012-09-25 13:49:10 UTC
Created attachment 124870 [details]
step1
Comment 2 unai 2012-09-25 13:49:26 UTC
Created attachment 124871 [details]
step2
Comment 3 unai 2012-09-25 13:49:38 UTC
Created attachment 124872 [details]
step3
Comment 4 unai 2012-09-25 13:49:50 UTC
Created attachment 124873 [details]
step4
Comment 5 unai 2012-09-25 13:50:04 UTC
Created attachment 124874 [details]
step5
Comment 6 unai 2012-09-25 13:50:30 UTC
Created attachment 124876 [details]
options
Comment 7 Jan Lahoda 2012-10-07 01:45:23 UTC
Dusan, could you please take a look? Thanks.
Comment 8 Dusan Balek 2012-12-03 16:22:28 UTC
Should be fixed in the current dev build.