Summary: | [push down] Push down method changes program behavior | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Torbjörn Ekman <Torbjorn.Ekman> |
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | daniel_megert, deepakazad, gsoares, markus.kell.r, martinae, stephan.herrmann, xiemaisi |
Version: | 3.3.1 | Keywords: | helpwanted |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: | stalebug |
Description
Torbjörn Ekman
2007-12-03 09:50:22 EST
Here is another example that does not preserve behaviour. Pushing down x() from X to SubX changes the printed message from 1 to 2. class X { void x() { System.out.println(y); } public int y = 1; } class SubX extends X { public int y = 2; public static void main(String[] args) { new SubX().x(); } } *** Bug 211860 has been marked as a duplicate of this bug. *** *** Bug 316828 has been marked as a duplicate of this bug. *** Though you can argue that user wants to change the program behavior, a warning on the preview page would be nice. >Though you can argue that user wants to change the program behavior, a warning
>on the preview page would be nice.
The point (and main difference to a quick assist) is that it must be preserving. In the past we started to lift that a little bit but in all those cases we switch to the preview page and show a warning.
*** Bug 356684 has been marked as a duplicate of this bug. *** *** Bug 356698 has been marked as a duplicate of this bug. *** *** Bug 355324 has been marked as a duplicate of this bug. *** 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. Statements that could cause changes in behaviour: - super calls (comment 0) - access to a field that is hidden in the subclass (comment 1) See also the duplicates for additional relevant situations. Anyone up to the task to implement corresponding warnings? 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. 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. |