Community
Participate
Working Groups
Behavior Preserving Transformation is rejected. Reproducible: Always Steps to Reproduce: 1. Create the following program package p; class A { } class B extends A { int x; } class C extends A { boolean x; } 2. Pull Up Field B.x 3. The tool does not apply the transformation and warn the following message: Field 'p.C.x' declared in type 'p.C' has a different type than its moved counterpart. 4. However, the following possible resulting program compiles and the transformation preserves the program behavior, which indicates that some refactoring conditions may be overly strong. package p; class A { int x; } class B extends A { } class C extends A { }
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.
As of 4.12 M1 it is actually worse: The unnecessary error is shown and one can continue the refactoring which results in wrong code: it removes C.x! The error should be changed into a warning and the refactoring should generate: package p; class A { int x; } class B extends A { } class C extends A { boolean x; }