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 235246

Summary: [extract superclass] does not work in inner class
Product: java Reporter: ssazonov
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: img_01

Description ssazonov 2013-08-29 13:32:35 UTC
Create simple java class:

//===========================
package simpleproject123;

public class SimpleClass {
	public class MyClass{
		public void method(){
			System.out.println("123");
		}
	}
}
//===========================

1. Put caret into Sim|pleClass (where '|' is a position of caret) 

2. Right click > refactor > Extract Superclass...

3. Check method() and press refactor

>> new class have not been created

Product Version: NetBeans IDE Dev (Build 201308261123)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 ssazonov 2013-08-29 13:33:00 UTC
Created attachment 139433 [details]
img_01
Comment 2 ssazonov 2013-08-29 13:43:25 UTC
Sorry, there is a mistake in step (1), it should be:

1. Put caret into MyC|lass (where '|' is a position of caret)
Comment 3 Ralph Ruijs 2015-07-01 13:08:41 UTC
changeset:   372bc58509b7
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Wed Jul 01 15:06:21 2015 +0200
summary:     #235246 - [extract superclass] does not work in inner class
Comment 4 Quality Engineering 2015-07-02 01:18:32 UTC
Integrated into 'main-silver', will be available in build *201507020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/372bc58509b7
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #235246 - [extract superclass] does not work in inner class