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 98166 - [Push Down Field] Refactoring does not replace field reference
Summary: [Push Down Field] Refactoring does not replace field reference
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-19 06:18 UTC by kely_garcia
Modified: 2014-09-13 04:53 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 kely_garcia 2007-03-19 06:18:58 UTC
Build ID: 200609161800 (Netbeans 6.0 M3)

Steps to reproduce: apply Push Down Field refactoring on the following program:

public class A {
    public int f;
    
    class B extends A {
        public void method1(){
            int aVal = 0;
            super.f = 0;
        }
    }
}

PushDownField refactoring produces the uncompilable code below:

public class A {
    
    class B extends A {
        public void method1(){
            int aVal = 0;
            super.f = 0;
        }

        public int f;
    }
}

Variations on the same theme: the same bug occurs if field f is referenced like
in A.this.f, new A().f
Comment 1 Jiri Prox 2008-04-11 01:46:27 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 2 Ralph Ruijs 2014-09-08 22:16:47 UTC
changeset:   62cf51ca9bb4
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Tue Sep 09 00:13:40 2014 +0200
summary:     #236076 #98166
             Update this and super keywords for pushed-down members
Comment 3 Quality Engineering 2014-09-13 04:53:04 UTC
Integrated into 'main-silver', will be available in build *201409130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/62cf51ca9bb4
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #236076 #98166
Update this and super keywords for pushed-down members