[forge-issues] [JBoss JIRA] (FORGE-2530) IndexOutOfBoundsException in IDEA when running custom command

Claus Ibsen (JIRA) issues at jboss.org
Wed Nov 11 10:46:01 EST 2015


Claus Ibsen created FORGE-2530:
----------------------------------

             Summary: IndexOutOfBoundsException in IDEA when running custom command
                 Key: FORGE-2530
                 URL: https://issues.jboss.org/browse/FORGE-2530
             Project: Forge
          Issue Type: Bug
          Components: UI - IntelliJ IDEA
    Affects Versions: 3.0.0.Alpha1
         Environment: IDEA 15 with latest forge plugin update installed
            Reporter: Claus Ibsen


I run the Camel forge addon, where we have a multi step wizard.

And when I click next I can get this exception from within forge itself.
{code}
Index: 2, Size: 2
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
	at java.util.ArrayList.get(ArrayList.java:429)
	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.getCurrentEntry(WizardCommandControllerImpl.java:491)
	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.getCurrentController(WizardCommandControllerImpl.java:502)
	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.getMetadata(WizardCommandControllerImpl.java:262)
	at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.getMetadata(NoUIWizardControllerDecorator.java:207)
	at sun.reflect.GeneratedMethodAccessor1712.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:123)
	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
	at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:96)
	at org.jboss.forge.addon.ui.controller.CommandController_$$_javassist_95731ae3-f50e-4add-917c-6a0b2360542a.getMetadata(CommandController_$$_javassist_95731ae3-f50e-4add-917c-6a0b2360542a.java)
	at org.jboss.forge.plugin.idea.ui.wizard.ForgeWizardStep.getExplanation(ForgeWizardStep.java:144)
	at com.intellij.ui.wizard.WizardDialog.c(WizardDialog.java:172)
	at com.intellij.ui.wizard.WizardDialog.onStepChanged(WizardDialog.java:224)
	at com.intellij.ui.wizard.WizardModel.a(WizardModel.java:93)
	at com.intellij.ui.wizard.WizardModel.next(WizardModel.java:76)
	at com.intellij.ui.wizard.WizardAction$Next.actionPerformed(WizardAction.java:46)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6543)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6308)
	at java.awt.Container.processEvent(Container.java:2235)
	at java.awt.Component.dispatchEventImpl(Component.java:4899)
	at java.awt.Container.dispatchEventImpl(Container.java:2293)
	at java.awt.Component.dispatchEvent(Component.java:4721)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4897)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4461)
	at java.awt.Container.dispatchEventImpl(Container.java:2279)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4721)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:702)
	at java.awt.EventQueue$3.run(EventQueue.java:696)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:721)
	at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:861)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:380)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
	at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1637)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1586)
	at org.jboss.forge.plugin.idea.ui.CommandListPopupBuilder.openWizard(CommandListPopupBuilder.java:224)
	at org.jboss.forge.plugin.idea.ui.CommandListPopupBuilder.access$300(CommandListPopupBuilder.java:54)
	at org.jboss.forge.plugin.idea.ui.CommandListPopupBuilder$3.run(CommandListPopupBuilder.java:173)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:702)
	at java.awt.EventQueue$3.run(EventQueue.java:696)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
	at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:861)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:380)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
{code}

Maybe that part of the code can be enhanced to detect that out of bounds and report a better exception or maybe its some bug in forge itself.

To reproduce I can setup a Camel github project. And then you would need to install the camel addon, and run a camel-add-endpoint command and select the file component, and then enter a directory, and then click the next button to get this exception.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the forge-issues mailing list