freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [20/50] incubator-freemarker git commit: (Error message typo. Better error message for allow_nothing VS allows_nothing.)
Date Sat, 05 Aug 2017 14:26:40 GMT
(Error message typo. Better error message for allow_nothing VS allows_nothing.)


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

Branch: refs/heads/2.3
Commit: dc3277e0d52ad304abdffe6f687d0a152071d5dc
Parents: 3fc5f90
Author: ddekany <ddekany@apache.org>
Authored: Tue Jun 13 18:57:07 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Tue Jun 13 18:57:07 2017 +0200

----------------------------------------------------------------------
 src/main/java/freemarker/core/Configurable.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/dc3277e0/src/main/java/freemarker/core/Configurable.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/Configurable.java b/src/main/java/freemarker/core/Configurable.java
index 7262e4f..914015a 100644
--- a/src/main/java/freemarker/core/Configurable.java
+++ b/src/main/java/freemarker/core/Configurable.java
@@ -947,7 +947,7 @@ public class Configurable {
         int commaIdx = booleanFormat.indexOf(',');
         if (commaIdx == -1) {
             throw new IllegalArgumentException(
-                    "Setting value must be string that contains two comma-separated values
for true and false, " +
+                    "Setting value must be a string that contains two comma-separated values
for true and false, " +
                     "respectively.");
         }
         
@@ -2538,6 +2538,12 @@ public class Configurable {
                     }
                     setNewBuiltinClassResolver(
                             new OptInTemplateClassResolver(allowedClasses, trustedTemplates));
+                } else if ("allow_nothing".equals(value)) {
+                    throw new IllegalArgumentException(
+                            "The correct value would be: allows_nothing");
+                } else if ("allowNothing".equals(value)) {
+                    throw new IllegalArgumentException(
+                            "The correct value would be: allowsNothing");
                 } else if (value.indexOf('.') != -1) {
                     setNewBuiltinClassResolver((TemplateClassResolver) _ObjectBuilderSettingEvaluator.eval(
                                     value, TemplateClassResolver.class, false,


Mime
View raw message