Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357419

Summary: [pull up field] enables field hiding (behavioral change)
Product: [Eclipse Project] JDT Reporter: Gustavo Soares <gsoares>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: raksha.vasisht
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Gustavo Soares CLA 2011-09-12 16:58:20 EDT
Build Identifier: 

Program's behavior change after pulling up a field. 



Reproducible: Always

Steps to Reproduce:
1. Create the classes

public class A {
  public int k = 10;
}
public class B extends A {
}
public class C extends B {
  private int k = 20;
  public int test() {
    return super.k;
  }    
}

2. Apply the pull up field refactoring to f

public class A {
  public int k = 10;
}
public class B extends A {
  private int k = 20;
}
public class C extends B {
  public int test() {
    return super.k;
  }    
}

3. After the transformation, the test method returns 20 instead of 10.
Comment 1 Raksha Vasisht CLA 2011-10-24 13:23:03 EDT

*** This bug has been marked as a duplicate of bug 235112 ***