Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae 40ced2d45 -> 54bd25b0e


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/54bd25b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/54bd25b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/54bd25b0

Branch: refs/heads/2.3-gae
Commit: 54bd25b0ec51f40ba6e231edf21bef56aa6a8330
Parents: 40ced2d
Author: ddekany <ddek...@apache.org>
Authored: Tue Mar 13 09:41:35 2018 +0100
Committer: ddekany <ddek...@apache.org>
Committed: Tue Mar 13 09:41:35 2018 +0100

----------------------------------------------------------------------
 .../java/freemarker/core/ExtendedDecimalFormatParser.java     | 5 ++++-
 src/manual/en_US/book.xml                                     | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/54bd25b0/src/main/java/freemarker/core/ExtendedDecimalFormatParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/ExtendedDecimalFormatParser.java 
b/src/main/java/freemarker/core/ExtendedDecimalFormatParser.java
index c31171b..0c3286a 100644
--- a/src/main/java/freemarker/core/ExtendedDecimalFormatParser.java
+++ b/src/main/java/freemarker/core/ExtendedDecimalFormatParser.java
@@ -80,7 +80,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);
                 }
 
                 if (_JavaVersions.JAVA_6 == null) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/54bd25b0/src/manual/en_US/book.xml
----------------------------------------------------------------------
diff --git a/src/manual/en_US/book.xml b/src/manual/en_US/book.xml
index 3d8e321..231b607 100644
--- a/src/manual/en_US/book.xml
+++ b/src/manual/en_US/book.xml
@@ -27578,6 +27578,13 @@ TemplateModel x = env.getVariable("x");  // get 
variable x</programlisting>
               <para><literal>freemarker.ext.beans.HashAdapter.size()</literal>
               was overridden for better performance.</para>
             </listitem>
+
+            <listitem>
+              <para>Fixed incorrect listing of valid
+              <literal>roundingMode</literal>-s in <link
+              linkend="topic.extendedJavaDecimalFormat">extended Java decimal
+              format</link> parsing error message</para>
+            </listitem>
           </itemizedlist>
         </section>
       </section>

Reply via email to