Project: Birt
Bug 235998 [Regression] Exception should not be thrown out if the pattern of Axis label is not correct [13]
Reported: 2008-06-06 04:47:29 | Status: closed fixed

Description: Exception should not be thrown out if the patten of Axis label is not correct. Build number: 2.3.0.v20080606-0630 Steps to reproduce: 1. New a chart with value series binding to a linear type of data. 2. In "Format Chart" tab, select Y-Axis, invoke format specifier editor, in "Edit Format" dialogue, choose Advanced, set patten as "@##.##". Expected result: No exception but error "Malformed pattern in pattern "@##.##" is shown in chart builder. Actual result: Exception is thrown out. Error log: java.lang.IllegalArgumentException: Malformed pattern in pattern "@##.##" at com.ibm.icu.text.DecimalFormat.patternError(DecimalFormat.java:4197) at com.ibm.icu.text.DecimalFormat.applyPattern(DecimalFormat.java:4045) at com.ibm.icu.text.DecimalFormat.applyPattern(DecimalFormat.java:3647) at org.eclipse.birt.chart.model.attribute.impl.JavaNumberFormatSpecifierImpl.format(JavaNumberFormatSpecifierImpl.java:307) at org.eclipse.birt.chart.computation.ValueFormatter.format(ValueFormatter.java:153) at org.eclipse.birt.chart.ui.swt.composites.FormatSpecifierPreview.updatePreview(FormatSpecifierPreview.java:106) at org.eclipse.birt.chart.ui.swt.composites.FormatSpecifierComposite.updatePreview(FormatSpecifierComposite.java:587) at org.eclipse.birt.chart.ui.swt.composites.FormatSpecifierComposite.access$3(FormatSpecifierComposite.java:585) at org.eclipse.birt.chart.ui.swt.composites.FormatSpecifierComposite$NumberAdvancedComposite.modifyText(FormatSpecifierComposite.java:1062) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:166) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1007) at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2430) at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:3918) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3785) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4539) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2273) at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:183) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3872) at org.eclipse.swt.widgets.Text.windowProc(Text.java:2074) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4526) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2370) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3418) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.birt.chart.ui.swt.wizard.format.axis.AbstractAxisSubtask.widgetSelected(AbstractAxisSubtask.java:707) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3821) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420) 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:102) at org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:181) at org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:228) at org.eclipse.birt.report.designer.internal.ui.extension.ExtendedEditPart.performDirectEdit(ExtendedEditPart.java:157) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.performRequest(ReportElementEditPart.java:143) 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.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:182) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3821) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:112) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) 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:382) 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:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Files changed in fix:
chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FormatSpecifierComposite.java