From 931969f4dec3e4afa094a01b8b3144ca7086d3ed Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Fri, 15 Sep 2023 15:57:39 +0200 Subject: [PATCH] LDEV-4693 - use same approach as in Lucee 6 --- core/src/main/java/lucee/runtime/op/Caster.java | 4 +--- loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/lucee/runtime/op/Caster.java b/core/src/main/java/lucee/runtime/op/Caster.java index 3be86129f8..9ad7de0990 100755 --- a/core/src/main/java/lucee/runtime/op/Caster.java +++ b/core/src/main/java/lucee/runtime/op/Caster.java @@ -2158,9 +2158,7 @@ public static String toString(double d) { } public static String toString(BigDecimal bd) { - String str = bd.toString(); - if (str.endsWith(".0")) return str.substring(0, str.length() - 2); - return str; + return df.format(bd); } public static String toString(Number n) { diff --git a/loader/build.xml b/loader/build.xml index a572ec69e3..2a7f9caf03 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index d5bbc1afe4..f519c4e2a6 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 5.4.3.7-SNAPSHOT + 5.4.3.8-SNAPSHOT jar Lucee Loader Build