Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355327 - [pull up] disables field hiding
Summary: [pull up] disables field hiding
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Kenneth Styrberg CLA
QA Contact: Roland Grunberg CLA
URL:
Whiteboard:
Keywords:
: 471951 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-21 18:12 EDT by Gustavo Soares CLA
Modified: 2019-11-20 12:26 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Soares CLA 2011-08-21 18:12:52 EDT
Build Identifier: 20110615-0604

Pulling up a field disables field hiding changing program behavior. 

Reproducible: Always

Steps to Reproduce:
1. Create the classes
public class A {
}
public class B extends A {
  public int k = 1;
}
public class C extends B {
  public int k = 2;
  public long test() {
    return k;
  }    
}
2. The test method returns 2. Apply the pull up field to B.k:
public class A {
  public int k = 1;
}
public class B extends A {   
}
public class C extends B {
  public long test() {
    return k;
  }    
}
3. After the transformation, the test method returns 1
Comment 1 Raksha Vasisht CLA 2011-10-24 13:54:56 EDT
(In reply to comment #0)
> 2. The test method returns 2. Apply the pull up field to B.k:
> public class A {
>   public int k = 1;
> }
> public class B extends A {   
> }
> public class C extends B {
>   public long test() {
>     return k;
>   }    
> }

Should not remove C.k. Happens with 3.8 build I20111021-0800 on win7.
Comment 2 Noopur Gupta CLA 2015-08-05 08:22:17 EDT
*** Bug 471951 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2019-09-10 13:36:42 EDT
New Gerrit change created: https://git.eclipse.org/r/149285
Comment 5 Kenneth Styrberg CLA 2019-11-01 10:54:30 EDT
Verified with eclipse-SDK-I20191101-0300-win32-x86_64
Comment 6 Roland Grunberg CLA 2019-11-20 12:26:48 EST
Thanks Kenneth for testing. In the future, make sure to do this with an I-build during the quiet week, and set the status to VERIFIED (FIXED) afterwards.

Verified for 4.14 M3 using I20191120-0840 build.