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 222403 - "Move members" refactoring generates wrong constructor for anonymous classes
Summary: "Move members" refactoring generates wrong constructor for anonymous classes
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: PC All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 15:23 UTC by aldobrucale
Modified: 2012-11-21 13:39 UTC (History)
0 users

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 aldobrucale 2012-11-19 15:23:19 UTC
[ BUILD # : 201211190002 ]
[ JDK VERSION : 1.7.9 ]

Test case:

public class A {
    public Runnable create() {
        return new Runnable() {
            public void run() {
            }
        };
    }
}

Moving the "create" method to class B yields

public class B {

    public Runnable create() {
        return new Runnable() {
            () {
                <init>();
            }

            public void run() {
            }
        };
    }
}
Comment 1 Ralph Ruijs 2012-11-20 16:50:55 UTC
Changeset: 0b9a4a6fd905
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2012-11-20 17:47
Comment 2 Quality Engineering 2012-11-21 13:39:43 UTC
Integrated into 'main-golden', will be available in build *201211211016* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0b9a4a6fd905
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #222403 - "Move members" refactoring generates wrong constructor for anonymous classes