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

Summary: [Push Down Field] Refactoring does not replace field reference
Product: java Reporter: kely_garcia <kely_garcia>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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