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.
Created attachment 141405 [details] Before - After 1. Create new simple java project with two packages "a" and "b" 2. Create 4 simple classes: package a; public class ClassA { } package b; public class ClassA { } package b; public class ClassB { ClassA getInstance() { a.ClassA rca = new a.ClassA(); return new ClassA(); } } package b; public class ClassC { } 3. Open class b.ClassB and put caret inside getInstance(){...} method body 4. Using ctrl+M invoke Move Members dialog 5. Select package "b" and "ClassC" then press refactor >> method is moved into b.ClassC but method is declared incorrectly package b; import a.ClassA; public class ClassC { ClassA getInstance() { ClassA rca = new ClassA(); return new b.ClassA(); } } (see also attached file) Product Version: NetBeans IDE 7.4 (Build 201310111528) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 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