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 - IndexOutOfBoundsException while refactoring Java
Summary: IndexOutOfBoundsException while refactoring Java
Status: RESOLVED DUPLICATE of bug 129376
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-14 11:36 UTC by amotz
Modified: 2008-03-06 11:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
requested log file (87.62 KB, text/plain)
2007-12-14 11:40 UTC, amotz
Details
log file (4.07 MB, text/plain)
2007-12-14 16:01 UTC, amotz
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***