diff options
author | Claude Brisson <cbrisson@apache.org> | 2019-03-03 17:47:32 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2019-03-03 17:47:32 +0000 |
commit | e6bc7dc9661efabf26a8aade5b546829bc8667dd (patch) | |
tree | 235e92ee80e0477770facd14ba03d5cb3fcfca3c /velocity-engine-core/src/main/java/org/apache/velocity/runtime | |
parent | d24fbe2c5729ad26f99462dd689cd3effb677dc0 (diff) | |
download | apache-velocity-engine-e6bc7dc9661efabf26a8aade5b546829bc8667dd.tar.gz |
[engine] Don't mix hyphens with dashes ; use '_' for word separator in corresponding property name
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/trunk@1854737 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src/main/java/org/apache/velocity/runtime')
3 files changed, 10 insertions, 10 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java index 3ffa3362..b5d3c0f3 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java @@ -305,10 +305,10 @@ public interface RuntimeConstants String PARSER_POOL_SIZE = "parser.pool.size"; /** - * Allow dash in identifiers (backward compatibility option) + * Allow hyphen in identifiers (backward compatibility option) * @since 2.1 */ - String PARSER_DASH_ALLOWED = "parser.allows.dash.in.identifiers"; + String PARSER_HYPHEN_ALLOWED = "parser.allow_hyphen_in_identifiers"; /** * Space gobbling mode diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java index 0a368ac4..180128f5 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java @@ -200,9 +200,9 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices private SpaceGobbling spaceGobbling; /** - * Whether dash is allowed in identifiers + * Whether hyphen is allowed in identifiers */ - private boolean dashAllowedInIdentifiers; + private boolean hyphenAllowedInIdentifiers; /** * Creates a new RuntimeInstance object. @@ -360,7 +360,7 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices } /* init parser behavior */ - dashAllowedInIdentifiers = getBoolean(PARSER_DASH_ALLOWED, false); + hyphenAllowedInIdentifiers = getBoolean(PARSER_HYPHEN_ALLOWED, false); } /** @@ -1849,11 +1849,11 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices } /** - * get whether dashes are allowed in identifiers + * get whether hyphens are allowed in identifiers * @return configured boolean flag */ - public boolean isDashAllowedInIdentifiers() + public boolean isHyphenAllowedInIdentifiers() { - return dashAllowedInIdentifiers; + return hyphenAllowedInIdentifiers; } } diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java index 7c317321..0f813220 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java @@ -469,8 +469,8 @@ public interface RuntimeServices SpaceGobbling getSpaceGobbling(); /** - * get whether dashes are allowed in identifiers + * get whether hyphens are allowed in identifiers * @return configured boolean flag */ - boolean isDashAllowedInIdentifiers(); + boolean isHyphenAllowedInIdentifiers(); } |