Bug 205586 - IllegalArgumentException: EXCEPTION_PARAMETER
IllegalArgumentException: EXCEPTION_PARAMETER
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
7.1
All All
: P1 (vote)
: 7.1
Assigned To: Ralph Ruijs
issues@java
EXCEPTIONS_REPORT
: 71_HR_FIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-27 19:15 UTC by aaronmahan
Modified: 2011-12-02 14:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (5.96 KB, text/plain)
2011-11-27 19:15 UTC, aaronmahan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aaronmahan 2011-11-27 19:15:46 UTC
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)
Comment 1 aaronmahan 2011-11-27 19:15:49 UTC
Created attachment 113553 [details]
stacktrace
Comment 2 Ralph Ruijs 2011-11-28 07:55:17 UTC
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.
Comment 3 Ralph Ruijs 2011-11-28 08:38:32 UTC
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.
Comment 4 Jiri Prox 2011-11-28 09:10:44 UTC
verified in the trunk
Comment 5 Jan Becicka 2011-11-28 09:39:27 UTC
both change sets are safe.
Comment 6 Jan Becicka 2011-11-28 19:37:02 UTC
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.
Comment 7 Quality Engineering 2011-11-29 08:46:36 UTC
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)
Comment 8 Quality Engineering 2011-12-01 12:08:39 UTC
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
Comment 9 Jiri Prox 2011-12-02 14:55:33 UTC
verified


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo