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 124021

Summary: IndexOutOfBoundsException while refactoring Java
Product: java Reporter: amotz <amotz>
Component: RefactoringAssignee: Daniel Prusa <dprusa>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: requested log file
log file

Description amotz 2007-12-14 11:36:19 UTC
IndexOutOfBoundsException while refactoring Java Code: Index 2 size 2
Comment 1 amotz 2007-12-14 11:40:01 UTC
Created attachment 54258 [details]
requested log file
Comment 2 Jan Becicka 2007-12-14 14:57:57 UTC
Any steps to reproduce? Thanks.
Comment 3 amotz 2007-12-14 15:55:09 UTC
To reproduce the error:
Create a project with the following interface:

package JoXer.Menus;

import JoXer.ProgressIndicator.TellUser;

/** Copyright 2003-2007 YAR Anner Ltd.
* 46, Jerusalem St. Kfar-Saba, Israel
*/
/** @version 1.2.2 */

/** Interface requirement for Java-written menu action classes
 *
 * @author  Amotz Anner
 */
public interface MenuActionClass {

    /** Perform the menu action
	 * @return <b>true</b> if action succeeded
	 * @param componentName The name of the component invoking the action.
	 * @param fetcher A context fetcher object.
	 * @param label Label attribute value from the menu item definition. 
     * @param tellUser User teller object. May be <b>null</b>.
     * @param params Optional additional parameters. */
    boolean performAction(MenuFetchContext fetcher, String label, String componentName, TellUser tellUser, Object...params);

}

Invent any definitions for MenuFetchContext and TellUser. They are not important.

Try refactor->change method signature to add the following paramter:

CountDownLatchWithProgress.CountDownable cntDn

As the fourth parameter, before the var-args one. To do that you need to define it as fifth parameter, and then move it
up to fourth position. The index ordinal error seems related to this movement, as it was 4 for this example.

I'm not sure that actual usages are required, but you may add some usage instances to the project, for verisimilitude.

I shall also attach the log for this error.
Comment 4 amotz 2007-12-14 16:01:03 UTC
Created attachment 54270 [details]
log file
Comment 5 Daniel Prusa 2008-03-06 11:29:34 UTC

*** This issue has been marked as a duplicate of 129376 ***