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.
1. Create simple java project with 2 classes in same package: package test; public class ClassA { public void m(){ ClassB b = new ClassB(); } } package test; public class ClassB { } 2. Right click ClassA in Projects view and from pop-up menu select Refactor > Move... 3. Select destination "test" and press Refactor >> Refactor should not allow to move class to its package (like renaming "ClassA" to "ClassA"). Useless "import test.ClassB;" has been added to ClassA despite ClassA remains in same package. Product Version: NetBeans IDE 7.4 (Build 201310111528) Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03 Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss