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 class: package test; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class ClassA { public void m3() throws FileNotFoundException, IOException { BufferedReader br = new BufferedReader(new FileReader("C:\\test.txt")); String s; while ((s = br.readLine()) != null) { System.out.println(s); } } } 2. Right click the body of ClassA and from pop-up menu select Refactor > Extract Interface 3. Type name "MyInterface", check method m3() and press Refactor >> There are missing imports in interface: package test; public interface MyInterface { void m3() throws FileNotFoundException, IOException; } 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)
changeset : fa8c90feb37a author : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date : Tue Jan 07 23:46:57 CET 2014 summary : #239347 - [Extract Interface] Shold add necessary imports to interface
Integrated into 'main-silver', will be available in build *201401090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/fa8c90feb37a User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #239347 - [Extract Interface] Shold add necessary imports to interface