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 253850 - Organize imports adds unwanted imports
Summary: Organize imports adds unwanted imports
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 10:22 UTC by stwr
Modified: 2015-08-03 13:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE suggest one more time to organize imports (104.49 KB, image/png)
2015-07-27 10:23 UTC, stwr
Details
Unwanted imports (118.28 KB, image/png)
2015-07-27 10:24 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-07-27 10:22:47 UTC
Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\8.1beta

Test Case --> http://services.netbeans.org/synergy/client/app/#/case/2220/suite/1701/v/1

After the 3rd step all imports have been correctly rearranged. In the same time another hint came up (see picture) and I decided to organize imports again according to the IDE suggestion.

I was surprised that formatter has added all my needed imports again (see picture).
Comment 1 stwr 2015-07-27 10:23:09 UTC
Created attachment 154941 [details]
IDE suggest one more time to organize imports
Comment 2 stwr 2015-07-27 10:24:07 UTC
Created attachment 154942 [details]
Unwanted imports
Comment 3 Dusan Balek 2015-07-27 16:34:59 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/61600d44b3d3
Comment 4 Quality Engineering 2015-07-28 01:20:24 UTC
Integrated into 'main-silver', will be available in build *201507280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/61600d44b3d3
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253850 - Organize imports adds unwanted imports - fixed.
Comment 5 Dusan Balek 2015-07-28 08:12:56 UTC
Improved fix.

http://hg.netbeans.org/jet-main/rev/95108177ea46
Comment 6 Vladimir Riha 2015-07-28 14:30:03 UTC
Verified in jet-main build. Dusane, could you please transplant it to beta-branch?

Thank you


Product Version: NetBeans IDE Dev (Build jet-main-1806-on-20150728)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Linux version 3.16.0-30-generic running on amd64; UTF-8; en_US (nb)
Comment 7 Dusan Balek 2015-07-28 14:59:37 UTC
Integrated into 'release81_beta' branch.

http://hg.netbeans.org/releases/rev/a84f33978028
Comment 8 Quality Engineering 2015-07-29 01:30:43 UTC
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/95108177ea46
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253850 - Organize imports adds unwanted imports - fix cont.
Comment 9 stwr 2015-07-31 10:05:22 UTC
The fix verified positively in *201507302201*.

However I discovered something different --> https://netbeans.org/bugzilla/show_bug.cgi?id=254025.
Comment 10 Jiri Prox 2015-08-03 13:39:04 UTC
verified in 8.1beta