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 197097 - Move Inner to Outer omits declared super() calls
Summary: Move Inner to Outer omits declared super() calls
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 204346 (view as bug list)
Depends on:
Blocks: 198186
  Show dependency tree
 
Reported: 2011-03-25 14:40 UTC by mklaehn
Modified: 2011-11-03 15:39 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 mklaehn 2011-03-25 14:40:03 UTC
package javaapplication1;
import java.util.EventObject;
public interface MyInterface {
    final class MyChangedEvent extends EventObject {
        public MyChangedEvent(final Object source) {
            super(source);
        }
    }
}

Refactoring MyInterface.MyChangeEvent via "Move Inner to Outer" results in

package javaapplication1;
import java.util.EventObject;
public final class MyChangedEvent extends EventObject {
    public MyChangedEvent(final Object source) {}
}
Comment 1 mklaehn 2011-03-25 15:00:10 UTC
build: nbms-and-javadoc-6918-on-20110324
Platform: PC and Mac
Comment 2 Jan Becicka 2011-03-25 15:42:12 UTC
it looks like super call is lost somewhere in code generator
Comment 3 Jan Lahoda 2011-04-14 10:03:57 UTC
I know the cause (the tree is considered to be synthetic, because the query for its end position uses the target CompilationUnitTree, which of course does not have an entry for the original tree). Not sure about the solution yet.
Comment 4 Jan Lahoda 2011-11-02 15:50:42 UTC
*** Bug 204346 has been marked as a duplicate of this bug. ***
Comment 5 Jan Lahoda 2011-11-02 15:52:41 UTC
Unfortunately, I still do not see a nice (and really universal) solution. Nonetheless, this should fix the problem in Move to Outter and similar refactorings:
http://hg.netbeans.org/jet-main/rev/31cd2cacd4ae
Comment 6 Quality Engineering 2011-11-03 15:39:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/31cd2cacd4ae
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #197097: Move Inner to Outer omits declared super() calls