Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340786 - [Patch] ArrayIndexOutOfBoundsException while opening Create Patch wizard with a key binding
Summary: [Patch] ArrayIndexOutOfBoundsException while opening Create Patch wizard with...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 13:05 EDT by Tomasz Zarna CLA
Modified: 2019-11-08 04:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-03-23 13:05:23 EDT
I20110310-1119

Steps:
1. Create a key binding for Create Patch (CVS), I used Alt+P
2. Follow steps from bug 314682
3. To create a patch use the key binding
=>
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard$OptionsPage.calculatePatchRoot(GenerateDiffFileWizard.java:1296)
at org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard$OptionsPage.createControl(GenerateDiffFileWizard.java:1208)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.run(GenerateDiffFileWizard.java:80)
at org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.run(GenerateDiffFileWizard.java:84)
at org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction.execute(GenerateDiffFileAction.java:55)
at org.eclipse.team.internal.ui.actions.TeamAction.execute(TeamAction.java:502)
at org.eclipse.team.internal.ui.actions.TeamAction.execute(TeamAction.java:474)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Control.traverse(Control.java:4033)
at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:3875)
at org.eclipse.swt.widgets.Composite.translateMnemonic(Composite.java:1178)
at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:3893)
at org.eclipse.swt.widgets.Display.translateMnemonic(Display.java:4757)
at org.eclipse.swt.widgets.Display.filterMessage(Display.java:1276)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3735)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Tomasz Zarna CLA 2011-03-23 13:11:23 EDT
An excerpt from org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.OptionsPage.calculatePatchRoot():

IResource[] tempResources = ((GenerateDiffFileWizard)this.getWizard()).resources;

if (tempResources == null)
	return;
if (tempResources.length > 1){
	[...]
} else {
	[...]
	IPath fullPath = tempResources[0].getFullPath();
	[...]
}

Apparently, tempResources is an empty array, but we're not prepared for that.
Comment 2 Lars Vogel CLA 2019-11-08 04:37:35 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant please remove the stalebug whiteboard tag.