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.

Bug 129376 - [Change Parameters] IOOBE when adding new parameter
Summary: [Change Parameters] IOOBE when adding new parameter
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Daniel Prusa
URL: http://statistics.netbeans.org/except...
Keywords:
: 124021 (view as bug list)
Depends on: 131928
Blocks:
  Show dependency tree
 
Reported: 2008-03-06 10:44 UTC by Jiri Prox
Modified: 2009-01-15 21:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 33858


Attachments
sample project (34.10 KB, text/plain)
2008-03-06 10:44 UTC, Jiri Prox
Details
sample project - correct MIME type (34.10 KB, application/x-compressed)
2008-03-06 10:45 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-03-06 10:44:07 UTC
Build: NetBeans IDE Dev (Build 20080306054758)
VM: Java HotSpot(TM) Client VM, 11.0-b11
OS: Linux, 2.6.22-14-generic, i386
User comments: IOOBE was thrown when adding new parameter 

Steps to reproduce:
1) open sample project
2) open class A
3) call Change parameters for method methodA(T,String, boolean, String...)
4) press Add button
5) press Move Up to get newly added parameter from the last position
6) confirm
STACKTRACE: (first 10 lines)
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
        at com.sun.tools.javac.util.List.get(List.java:419)
        at
org.netbeans.modules.refactoring.java.plugins.ChangeParamsTransformer.getNewArguments(ChangeParamsTransformer.java:103)
        at
org.netbeans.modules.refactoring.java.plugins.ChangeParamsTransformer.visitMethodInvocation(ChangeParamsTransformer.java:116)
        at
org.netbeans.modules.refactoring.java.plugins.ChangeParamsTransformer.visitMethodInvocation(ChangeParamsTransformer.java:64)
        at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1312)
        at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
        at com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:239)
        at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1152)
        at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
        at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
Comment 1 Jiri Prox 2008-03-06 10:44:37 UTC
Created attachment 57857 [details]
sample project
Comment 2 Jiri Prox 2008-03-06 10:45:26 UTC
Created attachment 57858 [details]
sample project - correct MIME type
Comment 3 Daniel Prusa 2008-03-06 11:28:46 UTC
Already reported in issue 124021, however, the attached test case is reliably reproducible, so I will keep this issue
open and mark the other one as a duplicate.
Comment 4 Daniel Prusa 2008-03-06 11:29:34 UTC
*** Issue 124021 has been marked as a duplicate of this issue. ***
Comment 5 Daniel Prusa 2008-03-06 12:28:17 UTC
Fixed in 94a978249fa2.
Comment 6 Jiri Prox 2009-01-15 21:28:39 UTC
verified in
Product Version: NetBeans IDE Dev (Build 20090115032805)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)