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 238000 - [Move Inner To Outer Level] Should check duplicit name in inner classes
Summary: [Move Inner To Outer Level] Should check duplicit name in inner classes
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 14:08 UTC by ssazonov
Modified: 2015-05-01 02:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Before / After (175.42 KB, image/png)
2013-11-05 14:08 UTC, ssazonov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ssazonov 2013-11-05 14:08:49 UTC
Created attachment 141870 [details]
Before / After

1. Create new java project and add simple java class ClassC:

public class Class_A {
	public class Class_B {
		public class Class_C {
		}
	}
	public class Class_C {
	}
}

2. Put caret into body of Class_C (so Class_A.Class_B.Class_C)

3. From main menu select Refactor > Move Inner To Outer Level...

4. Leave all options as default and press Refactor

>> Without any warning it perform refactor, although class with same name already exists so code is become incompilable (see attached image)

Product Version: NetBeans IDE Dev (Build 201310290001)
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)
Comment 1 Ralph Ruijs 2015-04-30 10:06:06 UTC
changeset:   ae58b0c44216
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Thu Apr 30 12:04:53 2015 +0200
summary:     #238000 - [Move Inner To Outer Level] Should check duplicit name in inner classes
Comment 2 Quality Engineering 2015-05-01 02:55:04 UTC
Integrated into 'main-silver', will be available in build *201505010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ae58b0c44216
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #238000 - [Move Inner To Outer Level] Should check duplicit name in inner classes