Bug 313043 - [push down] Pushing down a field disables field hiding and changes program behavior
Summary: [push down] Pushing down a field disables field hiding and changes program be...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 235118 531946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-16 15:20 EDT by Gustavo Soares CLA
Modified: 2023-01-28 14:32 EST (History)
5 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 2010-05-16 15:20:24 EDT
Build Identifier: 20090920-1017

Pushing down a field that hides other field may changes program behavior 

Reproducible: Always

Steps to Reproduce:
1. Create classes:

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

2. The method test returns 20.

3. Apply the push down method refactoring to B.k

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

4. After the refactoring, the method test returns 10 instead of 20. The refactoring changes program behavior.
Comment 1 Dani Megert CLA 2010-05-19 10:41:17 EDT
Similar to bug 313045 but the other way around.
Comment 2 Dani Megert CLA 2010-05-19 11:01:37 EDT
Not a regression.
Comment 3 Deepak Azad CLA 2010-06-15 16:08:57 EDT
*** Bug 235118 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Genie CLA 2019-01-21 19:27:15 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Dani Megert CLA 2019-01-22 05:52:53 EST
Still an issue in 4.10.
Comment 6 Dani Megert CLA 2019-01-22 05:55:13 EST
*** Bug 531946 has been marked as a duplicate of this bug. ***
Comment 7 Eclipse Genie CLA 2021-01-12 04:05:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Jeff Johnston CLA 2021-01-12 14:18:25 EST
This is still an issue in 4.19M1
Comment 9 Eclipse Genie CLA 2023-01-28 14:32:00 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.