freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [05/32] incubator-freemarker git commit: Test fix: Avoiding strange rounding difference on Java 8 (Double 10.305 0.## half-up is 10.31 on Java 6, but 10.3 on Java 8.)
Date Sat, 26 Mar 2016 15:41:19 GMT
Test fix: Avoiding strange rounding difference on Java 8 (Double 10.305 0.## half-up is 10.31
on Java 6, but 10.3 on Java 8.)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/e4510739
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/e4510739
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/e4510739

Branch: refs/heads/2.3
Commit: e4510739bae639366126dc3dc46e71b93aff4e19
Parents: 738b16b
Author: ddekany <ddekany@apache.org>
Authored: Mon Jan 25 00:57:18 2016 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Mon Jan 25 00:57:18 2016 +0100

----------------------------------------------------------------------
 src/test/java/freemarker/manual/CustomFormatsExample.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/e4510739/src/test/java/freemarker/manual/CustomFormatsExample.java
----------------------------------------------------------------------
diff --git a/src/test/java/freemarker/manual/CustomFormatsExample.java b/src/test/java/freemarker/manual/CustomFormatsExample.java
index e438b54..2f8778e 100644
--- a/src/test/java/freemarker/manual/CustomFormatsExample.java
+++ b/src/test/java/freemarker/manual/CustomFormatsExample.java
@@ -19,6 +19,7 @@
 package freemarker.manual;
 
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -53,7 +54,7 @@ public class CustomFormatsExample extends ExamplesTest {
         cfg.setCustomDateFormats(customDateFormats);
 
         addToDataModel("p", 10000);
-        addToDataModel("w", 10.305);
+        addToDataModel("w", new BigDecimal("10.305"));
         addToDataModel("fd", new Date(1450904944213L));
         addToDataModel("let", new Date(1450904944213L));
         


Mime
View raw message