Project: JDT
Bug 46929 refactoring: anonymous subclass of local type can be made nested [refactoring]
Reported: 2003-11-19 05:29:20 | Status: resolved fixed

I20031119 (M5 testpass) 1. Have this code: public class Test { public void foobar() { class Listener2 { public int bar() { return 0; } } this.addListener(new Listener2() { public int bar() { return 1; } }); } public void addListener(Object o) { } } 2. Select the anonymous class extending the local type 3. Choose Refactor->Convert Anonymous Class to Nested -> The refactoring is possible and does the semi-expected, creating a new nested type -> This is wrong, because the Listener type is not visible outside the method

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