Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 98166 - [Push Down Field] Refactoring does not replace field reference
[Push Down Field] Refactoring does not replace field reference
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
6.x
All All
: P3 (vote)
: 8.1
Assigned To: Ralph Ruijs
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo