Project: Birt
Bug 104757 "java.lang.IllegalArgumentException: Index out of bounds" exception thrown out after delete all the sql statement in query page
Reported: 2005-07-21 22:57:24 | Status: closed fixed

description: steps to reproduce: 1. new a data set, go to preview page 2. then go to Query page,delete all the Sql statement 3. go to preview page actual result: "java.lang.IllegalArgumentException: Index out of bounds" exception thrown out expected result: no exception thrown out exception stack trace: java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:2677) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.SWT.error(SWT.java:2587) at org.eclipse.swt.custom.StyledText.setSelectionRange (StyledText.java:7190) at org.eclipse.swt.custom.StyledText.setSelection(StyledText.java:7162) at org.eclipse.birt.report.data.oda.jdbc.ui.editors.SQLDataSetEditorPage.prepareUI (SQLDataSetEditorPage.java:1259) at org.eclipse.birt.report.data.oda.jdbc.ui.editors.SQLDataSetEditorPage.pageActiv ated(SQLDataSetEditorPage.java:1242) at org.eclipse.birt.report.designer.ui.dialogs.properties.AbstractPropertyDialog.s howPage(AbstractPropertyDialog.java:420) at org.eclipse.birt.report.designer.ui.dialogs.properties.AbstractPropertyDialog.s howSelectionPage(AbstractPropertyDialog.java:342) at org.eclipse.birt.report.designer.ui.dialogs.properties.AbstractPropertyDialog.a ccess$200(AbstractPropertyDialog.java:60) at org.eclipse.birt.report.designer.ui.dialogs.properties.AbstractPropertyDialog$2 .run(AbstractPropertyDialog.java:300) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69) at org.eclipse.birt.report.designer.ui.dialogs.properties.AbstractPropertyDialog$1 .selectionChanged(AbstractPropertyDialog.java:295) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:616) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1394) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:693) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected (StructuredViewer.java:718) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent (OpenStrategy.java:180) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:175) at org.eclipse.jface.util.OpenStrategy$1.handleEvent (OpenStrategy.java:324) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) at org.eclipse.jface.window.Window.runEventLoop(Window.java:668) at org.eclipse.jface.window.Window.open(Window.java:648) at org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDialog.open (BaseDialog.java:145) at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.editDataSet (NewDataSetAction.java:182) at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.run (NewDataSetAction.java:136) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:915) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:866) at org.eclipse.jface.action.ActionContributionItem$7.handleEvent (ActionContributionItem.java:785) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)

Files changed in fix:
data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java