Skip to content

Commit

Permalink
Fixed: Support non-breaking spaces in numeric strings (OFBIZ-13168)
Browse files Browse the repository at this point in the history
While backporting I made 2 mistakes, that fixes them
  • Loading branch information
JacquesLeRoux committed Nov 13, 2024
1 parent 38cb931 commit 1c9ad82
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -389,7 +390,7 @@ public void testString() throws GeneralException, Exception {
// 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);
}

Expand Down

0 comments on commit 1c9ad82

Please sign in to comment.