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.
Summary: | Organize imports: Duplicated static imports won't get removed | ||
---|---|---|---|
Product: | java | Reporter: | markiewb |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | markiewb |
Priority: | P3 | ||
Version: | 8.0.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Shows the issue |
Fixed in jet-main#894b65304bad Integrated into 'main-silver', will be available in build *201505120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/894b65304bad User: Svata Dedic <sdedic@netbeans.org> Log: #247222: at most one star import is retained for organize imports See also bug #254955 (Refactor/Rename duplicates static imports). |
Created attachment 149301 [details] Shows the issue * See following classes ``` package com.foo; public interface IFoo { public enum PropertyType { Details, Key } } ``` ``` package com.bar; import static com.foo.IFoo.PropertyType.*; import static com.foo.IFoo.PropertyType.*; import static com.foo.IFoo.PropertyType.*; import static org.junit.Assert.*; public class Bar { private void method() { assertEquals("", Details); } } ``` * configure the import order regarding the screenshot * invoke organize imports for the file Bar.java ACTUAL: * duplicated static imports are NOT removed EXPECTED: * duplicated static imports are removed Product Version: NetBeans IDE 8.0.1 (Build 201408142300) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)