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 222937

Summary: Organize members corrupts constructor
Product: java Reporter: _ gtzabari <gtzabari>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P1    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Testcase

Description _ gtzabari 2012-11-29 04:35:36 UTC
Created attachment 128548 [details]
Testcase

Product Version: NetBeans IDE Dev (Build 201211270002)
Java: 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

Invoking the "organize members" hint replaces the constructor name by <init>. To reproduce, run "organize members" on the attached testcase.
Comment 1 _ gtzabari 2012-11-29 04:38:44 UTC
The method being moved ends up getting the constructor name. So at least methods are getting corrupted here.
Comment 2 Jan Lahoda 2012-11-29 10:19:23 UTC
Fixed:
http://hg.netbeans.org/jet-main/rev/bed9a2d7bdd0
Comment 3 Quality Engineering 2012-11-30 02:43:09 UTC
Integrated into 'main-golden', will be available in build *201211300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bed9a2d7bdd0
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #222937: correct handling of constructor<->method changes