Project: Birt
Bug 270696 ArrayIndexOutOfBoundsException was thrown out when click Data Binding if there has no bindings
Reported: 2009-03-31 22:56:32 | Status: closed fixed

Description: ArrayIndexOutOfBoundsException was thrown out when click Data Binding if there has no bindings Build number: 2.5.0.v20090401-0630 Steps to reproduce: 1, New a script data source 2, New a script dataset without bindings 3, New a chart binding the script dataset 4, Click Data Bindings button in Select Data Page Expected result: No exception happened Actual result: ArrayIndexOutOfBoundsException occurred. Error log: java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.get(Unknown Source) at org.eclipse.birt.chart.reportitem.ui.dialogs.ChartColumnBindingDialog.isOwnColumnBinding(ChartColumnBindingDialog.java:316) at org.eclipse.birt.chart.reportitem.ui.dialogs.ChartColumnBindingDialog.updateButtons(ChartColumnBindingDialog.java:304) at org.eclipse.birt.report.designer.ui.dialogs.ColumnBindingDialog.refreshBindingTable(ColumnBindingDialog.java:1387) at org.eclipse.birt.report.designer.ui.dialogs.ColumnBindingDialog.load(ColumnBindingDialog.java:1264) at org.eclipse.birt.report.designer.ui.dialogs.ColumnBindingDialog.initDialog(ColumnBindingDialog.java:1240) at org.eclipse.birt.report.designer.ui.dialogs.BaseDialog.open(BaseDialog.java:102) at org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet.invokeDataBinding(StandardChartDataSheet.java:956) at org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet.handleEvent(StandardChartDataSheet.java:1133) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:87) at org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:200) at org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:257) at org.eclipse.birt.report.designer.internal.ui.extension.ExtendedEditPart.performDirectEdit(ExtendedEditPart.java:156) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.performRequest(ReportElementEditPart.java:148) at org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:187) at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:131) at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:955) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.tools.ReportElementDragTracker.mouseDoubleClick(ReportElementDragTracker.java:127) at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:501) at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:208) at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:285) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:508) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:183) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284)

Files changed in fix:
chart/org.eclipse.birt.chart.reportitem.ui/src/org/eclipse/birt/chart/reportitem/ui/dialogs/ChartColumnBindingDialog.java