Project: JDT
Bug 26250 inline method - breaks code when inlining virtual methods [refactoring]
Reported: 2002-11-14 05:24:41 | Status: resolved fixed

I-20021113 w2k w/ jdt.core patch: When inlining the method Test0.getMessage(), there could be some warning that overridden methods exist in the workspace. In general, this is only safe if the method is private or final. public class Test0 { private static class Inner extends Test0 { String getMessage() { return "overridden"; } } String getMessage() { return "original"; } void printMessage() { System.out.println(getMessage()); } public static void main(String[] args) { new Inner().printMessage(); } }

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineMethodRefactoring.java