From 9643ee7cda488c500ae5f5278ad5eb610bfaefbf Mon Sep 17 00:00:00 2001 From: Wim Jongman Date: Thu, 13 Jun 2024 19:26:00 +0200 Subject: [PATCH] Out of memory error when creating a chart #1727 Sometimes NumberFormat is used to handle the decimal point and in other cases there is a dependency on ULocale. A small fix was made to use the default ULocale in the Numberformat calculations instead of the default NumberFormat The whole operation is not fully understood so more issues could arise. See the issue for a discussion. --- .../src/org/eclipse/birt/chart/ui/util/ChartUIUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/org.eclipse.birt.chart.ui/src/org/eclipse/birt/chart/ui/util/ChartUIUtil.java b/chart/org.eclipse.birt.chart.ui/src/org/eclipse/birt/chart/ui/util/ChartUIUtil.java index 096dcf316c..4827dcefa0 100644 --- a/chart/org.eclipse.birt.chart.ui/src/org/eclipse/birt/chart/ui/util/ChartUIUtil.java +++ b/chart/org.eclipse.birt.chart.ui/src/org/eclipse/birt/chart/ui/util/ChartUIUtil.java @@ -206,7 +206,7 @@ public static String getExpressionString(String colName) { * @return the default number format */ public static NumberFormat getDefaultNumberFormatInstance() { - NumberFormat numberFormat = NumberFormat.getInstance(); + NumberFormat numberFormat = NumberFormat.getInstance(ULocale.getDefault()); // fix icu limitation which only allow 3 fraction digits as maximum by // default. ?100 is enough. numberFormat.setMaximumFractionDigits(100);