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 253928

Summary: [81cat][refactoring]extract super class does not remove unused imports in original class
Product: java Reporter: manikantannaren <manikantannaren>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description manikantannaren 2015-07-29 03:44:10 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5138/suite/1801

Using the source code from above test case
Steps:

    Open extract.ClassB.java class
    Right click in the body of class and from pop-up menu select Refactor > Extract Superclass...
    In Extract Superclass dialog type Superlass name (e.g. MyClass), check all methods and press Preview
    Inspect changes and press Do Refactoring 

The refactoring operations performs correctly except for the imports in ClassB.

Expected result
All unused imports are removed in ClassB

Actual Result
Unused imports are present in ClassB
Comment 1 manikantannaren 2015-07-29 03:45:24 UTC
I believe this might be applicable to all push, pull, extract refactoring  operations and not just to the extract super class
Comment 2 Ralph Ruijs 2015-07-30 08:14:46 UTC

*** This bug has been marked as a duplicate of bug 231149 ***