Bug 231285 - [move type] changes behaviour in presence of subclassing
Summary: [move type] changes behaviour in presence of subclassing
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-09 08:30 EDT by Friedrich Steimann CLA
Modified: 2022-12-30 17:15 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich Steimann CLA 2008-05-09 08:30:15 EDT
The behaviour of the following program changes when B is moved to another package:

public class A {
	  void m() {System.out.println("A");}
	  public void n() {m();}
	  public static void main(String[] a) {(new B()).n();}
}

public class B extends A {
	void m() {System.out.println("B");}
}

A warning "The method B.m() does not override the inherited method from A since it is private to a different package" is issued after the refactoring, but this may be easily overlooked (and the offered quick fix is also broken, since it changes to default). The refactoring should either refuse to perform or increase accessibility of m in A and B to protected (given that this does not cause other problems).
Comment 1 Eclipse Genie CLA 2020-07-25 07:36:01 EDT
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 2 Eclipse Genie CLA 2022-12-30 17:15:03 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.