This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[dev-200506142000, JDK 1.5.0_04, Experimental Refac. 0.16.0.2.3 from AUC] I created form file with one button and let IDE create EventHandler for actionPerformed event. I invoked Convert Anonymous Class to Inner for the anonymous class and invoked Fix Import action after that. Undoing the refactoring operation resulted in completly broken source code, see attachment.
Created attachment 22702 [details] broken source code
It has nothing to do with Convert Anonymous Class to Inner - it can happen with any refactoring. Refactoring Undo should not be enabled after Fix Imports.
Cannot reproduce in latest build.
Easily reproducible in dev-200506261800. Steps: 1) Creat form 2) Add button 3) Let IDE generate actionPerformed handler 4) Create Inner Class from the annon. handler class 5) Fix Imports 6) Refactor | Undo
Sorry, maybe not reproducible - AUC still contains 0.16.0.2.3 version of Experimantal Refactorings.
Really reproducible in Ex. Refac. 0.17.0.2.3.
Another bug fixed: user should not be allowed to refactor code in guarded block. Checking in AnonymousToInnerRefactoringPlugin.java; /cvs/refactoring/experimental/src/org/netbeans/modules/refactoring/experimental/plugins/AnonymousToInnerRefactoringPlugin.java,v <-- AnonymousToInnerRefactoringPlugin.java new revision: 1.5; previous revision: 1.4 done
Verified in dev-200509211800.