From 21360cd7b8d13a761672494cdbc6bb53b20fff32 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Thu, 11 Jan 2024 17:28:51 +0100 Subject: [PATCH] LDEV-4780 - float to string as scientific notation --- core/src/main/java/lucee/runtime/op/Caster.java | 2 +- loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/lucee/runtime/op/Caster.java b/core/src/main/java/lucee/runtime/op/Caster.java index 9ad7de0990..d5d4cf82b9 100755 --- a/core/src/main/java/lucee/runtime/op/Caster.java +++ b/core/src/main/java/lucee/runtime/op/Caster.java @@ -2170,7 +2170,7 @@ public static String toString(Number n) { if (d > l && (d - l) < 0.000000000001) return toString(l); if (l > d && (l - d) < 0.000000000001) return toString(l); - if (n instanceof Double) return toString(n.doubleValue()); + if (n instanceof Double || n instanceof Float) return toString(n.doubleValue()); return n.toString(); // return df.format(d); } diff --git a/loader/build.xml b/loader/build.xml index 8c437adfd5..fb340ef137 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 1f8aa00a1c..e0358e3f7b 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 5.4.4.42-SNAPSHOT + 5.4.4.43-SNAPSHOT jar Lucee Loader Build