This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release24.09 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push: new 1c9ad82974 Fixed: Support non-breaking spaces in numeric strings (OFBIZ-13168) 1c9ad82974 is described below commit 1c9ad82974251fd91c9576732dbfaada7ce45487 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Wed Nov 13 10:26:23 2024 +0100 Fixed: Support non-breaking spaces in numeric strings (OFBIZ-13168) While backporting I made 2 mistakes, that fixes them --- .../base/src/test/java/org/apache/ofbiz/base/util/ObjectTypeTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/base/src/test/java/org/apache/ofbiz/base/util/ObjectTypeTests.java b/framework/base/src/test/java/org/apache/ofbiz/base/util/ObjectTypeTests.java index 4b5ace55f5..0a0318d5ff 100644 --- a/framework/base/src/test/java/org/apache/ofbiz/base/util/ObjectTypeTests.java +++ b/framework/base/src/test/java/org/apache/ofbiz/base/util/ObjectTypeTests.java @@ -48,6 +48,7 @@ public class ObjectTypeTests { // These numbers are all based on 1 / 128, which is a binary decimal // that can be represented by both float and double private final BigDecimal dcml = new BigDecimal("781.25"); + private final BigDecimal largeBigDecimal = new BigDecimal("29000"); private final Double dbl = Double.valueOf("7.8125E2"); private final Float flt = Float.valueOf("7.8125E2"); private final Long lng = Long.valueOf("781"); @@ -389,7 +390,7 @@ public class ObjectTypeTests { // usual pattern assumes that the String->BigDecimal conversion will break with bad timezone/locale // which is not the case for this particular test assertEquals("String->BigDecimal supports NBSP", - simpleTypeOrObjectConvert("29�000", "BigDecimal", null, LOCALE_DATA.goodTimeZone, + simpleTypeOrObjectConvert("29 000", "BigDecimal", null, LOCALE_DATA.goodTimeZone, LOCALE_DATA.goodLocale, false), largeBigDecimal); }