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.
This bug was originally marked as duplicate of bug 199733, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 7.1 Beta (Build 201109252201) VM: Java HotSpot(TM) 64-Bit Server VM, 20.4-b02-402, Java(TM) SE Runtime Environment, 1.6.0_29-b11-402-10M3527 OS: Mac OS X User Comments: johnsonlau: Refactor a local variable. aaronmahan: Trying to refactor-->rename 'ex' in the following auto-generated code: catch (Exception ex) { Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex); } Stacktrace: java.lang.IllegalArgumentException: EXCEPTION_PARAMETER at org.netbeans.api.java.source.ElementHandle.createImpl(ElementHandle.java:444) at org.netbeans.api.java.source.ElementHandle.create(ElementHandle.java:388) at org.netbeans.modules.refactoring.java.ui.RenameRefactoringUI.<init>(RenameRefactoringUI.java:102) at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider$1.createRefactoringUI(RefactoringActionsProvider.java:161) at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider$TextComponentTask.run(RefactoringActionsProvider.java:835) at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider$TextComponentTask.run(RefactoringActionsProvider.java:758)
Created attachment 113553 [details] stacktrace
This can be reproduced when renaming (not instant-rename) or doing a find usages on Exception Parameters or other element types which are not supported by ElementHandle. Fix; http://hg.netbeans.org/jet-main/rev/3cae6215d836 I think this should be ported to 7.1.
http://hg.netbeans.org/jet-main/rev/c97e56b60303 I added TypeParameter to the list of allowed elements. This was not documented, but support was added in 2007.
verified in the trunk
both change sets are safe.
transplanted to release71 changeset: 214426:c397d4659ae0 branch: release71 user: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date: Mon Nov 28 08:44:55 2011 +0100 summary: #205586 - IllegalArgumentException: EXCEPTION_PARAMETER changeset: 214427:d09c78384f12 branch: release71 tag: tip user: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date: Mon Nov 28 09:34:06 2011 +0100 summary: #205586 - Added TypeParameter to allowed types.
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/c397d4659ae0 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #205586 - IllegalArgumentException: EXCEPTION_PARAMETER (transplanted from 3cae6215d8362aa285231a8297a8d5aec03c3011)
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/3cae6215d836 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #205586 - IllegalArgumentException: EXCEPTION_PARAMETER
verified