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 231149 - import is not updated when refactoring
Summary: import is not updated when refactoring
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 253928 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-12 13:30 UTC by ssazonov
Modified: 2016-07-07 07:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ssazonov 2013-06-12 13:30:57 UTC
1. Create class 'SimpleClass' and insert this code:

  //---------------------------
  import java.io.File;

  public class SimpleClass{
    
      public void method() {
          File f = new File("abc");
      }
    
  }
  //---------------------------

2. Select 'SimpleClass'

3. Go to Refactor->Extract Superclass...

4. Set Superclass Name: 'AnotherClass', check method 'simpleMethod()', than press Refactor

5. Now SimpleClass looks like this:

  //---------------------------
  import java.io.File;

  public class SimpleClass extends AnotherClass{
    
  }
  //---------------------------

>> import java.io.File; should be deleted

Product Version: NetBeans IDE 7.3.1 (Build 201306052037)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b30
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Ralph Ruijs 2015-07-30 08:14:46 UTC
*** Bug 253928 has been marked as a duplicate of this bug. ***
Comment 2 Martin Balin 2016-07-07 07:18:20 UTC
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