Bug 211860 - [push down] Push down method does not handle private method accesses correctly
Summary: [push down] Push down method does not handle private method accesses correctly
Status: CLOSED DUPLICATE of bug 211755
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 290618 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-04 05:41 EST by Max Schaefer CLA
Modified: 2010-06-15 15:55 EDT (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 Max Schaefer CLA 2007-12-04 05:41:31 EST
Build ID: M20070212-1330

Steps To Reproduce:
Test case:

class A {
  private void k() { System.out.println(23); }
  void m() { k(); }
}
class B extends A {
  protected void k() { System.out.println(42); }
  public static void main(String[] args) {
    new B().m();
  }
}

This prints "23". Pushing down A.m into B just moves the method without any adjustments (apart from changing A.k's modifier to "protected"), so the resulting program prints "42".

More information:
Comment 1 Deepak Azad CLA 2010-06-15 15:49:33 EDT
*** Bug 290618 has been marked as a duplicate of this bug. ***
Comment 2 Deepak Azad CLA 2010-06-15 15:55:28 EDT

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