Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 36b33752e -> 274778428


Forward ported from 2.3-gae: Fixed incorrect listing of valid roundingMode-s in 
extended Java decimal format parsing error message


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

Branch: refs/heads/3
Commit: 27477842874bd90affc67dff71d2668c0c0a19a7
Parents: 36b3375
Author: ddekany <ddek...@apache.org>
Authored: Tue Mar 13 09:42:06 2018 +0100
Committer: ddekany <ddek...@apache.org>
Committed: Tue Mar 13 09:42:06 2018 +0100

----------------------------------------------------------------------
 .../core/valueformat/impl/ExtendedDecimalFormatParser.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/27477842/freemarker-core/src/main/java/org/apache/freemarker/core/valueformat/impl/ExtendedDecimalFormatParser.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/valueformat/impl/ExtendedDecimalFormatParser.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/valueformat/impl/ExtendedDecimalFormatParser.java
index cd4593d..a53dbe4 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/valueformat/impl/ExtendedDecimalFormatParser.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/valueformat/impl/ExtendedDecimalFormatParser.java
@@ -86,7 +86,10 @@ class ExtendedDecimalFormatParser {
                 } else if (value.equals(PARAM_VALUE_RND_UNNECESSARY)) {
                     parsedValue = RoundingMode.UNNECESSARY;
                 } else {
-                    throw new InvalidParameterValueException("Should be one 
of: u, d, c, f, hd, he, hu, un");
+                    throw new InvalidParameterValueException("Should be one 
of: "
+                            + PARAM_VALUE_RND_UP + ", " + PARAM_VALUE_RND_DOWN 
+ ", " + PARAM_VALUE_RND_CEILING + ", "
+                            + PARAM_VALUE_RND_FLOOR + ", " + 
PARAM_VALUE_RND_HALF_DOWN + ", "
+                            + PARAM_VALUE_RND_HALF_EVEN + ", " + 
PARAM_VALUE_RND_UNNECESSARY);
                 }
 
                 parser.roundingMode = parsedValue;

Reply via email to