freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [09/19] incubator-freemarker git commit: (Removed unused EvalUtil.modelToNumber call)
Date Fri, 25 Aug 2017 23:39:35 GMT
(Removed unused EvalUtil.modelToNumber call)


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

Branch: refs/heads/2.3
Commit: a923ee8fa24679746a48fe7c3a60a7a316d076d2
Parents: 08aa789
Author: ddekany <ddekany@apache.org>
Authored: Sun Aug 20 00:08:47 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Sun Aug 20 00:08:47 2017 +0200

----------------------------------------------------------------------
 src/main/java/freemarker/core/BuiltInsForMultipleTypes.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a923ee8f/src/main/java/freemarker/core/BuiltInsForMultipleTypes.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/BuiltInsForMultipleTypes.java b/src/main/java/freemarker/core/BuiltInsForMultipleTypes.java
index 98c3a4d..2adcebc 100644
--- a/src/main/java/freemarker/core/BuiltInsForMultipleTypes.java
+++ b/src/main/java/freemarker/core/BuiltInsForMultipleTypes.java
@@ -691,9 +691,7 @@ class BuiltInsForMultipleTypes {
         TemplateModel _eval(Environment env) throws TemplateException {
             TemplateModel model = target.eval(env);
             if (model instanceof TemplateNumberModel) {
-                TemplateNumberModel numberModel = (TemplateNumberModel) model;
-                Number num = EvalUtil.modelToNumber(numberModel, target);
-                return new NumberFormatter(numberModel, env);
+                return new NumberFormatter((TemplateNumberModel) model, env);
             } else if (model instanceof TemplateDateModel) {
                 TemplateDateModel dm = (TemplateDateModel) model;
                 return new DateFormatter(dm, env);


Mime
View raw message