You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2017/07/15 22:05:17 UTC

[1/6] incubator-freemarker git commit: Removed namingConvention setting, and made directive names, built-in names, special variable names, and setting names, camel case. (Other naming conventions, if needed, are planned to be handled with custom dialects

Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 ce9ab30f2 -> bc35fa237


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ProcessingConfiguration.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ProcessingConfiguration.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ProcessingConfiguration.java
index 86b7511..43cdf72 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ProcessingConfiguration.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ProcessingConfiguration.java
@@ -118,16 +118,16 @@ public interface ProcessingConfiguration {
      *   default system time zone of the JDBC client, not just on the content of the database. (This used to be the
      *   default behavior of ORM-s, like Hibernate, too.)
      *
-     *   <li>The value of the {@code time_zone} FreeMarker configuration setting sets the time zone used for the
+     *   <li>The value of the {@code timeZone} FreeMarker configuration setting sets the time zone used for the
      *   template output. For example, when a web page visitor has a preferred time zone, the web application framework
      *   may calls {@link Environment#setTimeZone(TimeZone)} with that time zone. Thus, the visitor will
      *   see {@link java.sql.Timestamp java.sql.Timestamp} and plain {@link java.util.Date java.util.Date} values as
      *   they look in his own time zone. While
      *   this is desirable for those types, as they meant to represent physical points on the time line, this is not
-     *   necessarily desirable for date-only and time-only values. When {@code sql_date_and_time_time_zone} is
-     *   {@code null}, {@code time_zone} is used for rendering all kind of date/time/dateTime values, including
+     *   necessarily desirable for date-only and time-only values. When {@code sqlDateAndTimeTimeZone} is
+     *   {@code null}, {@code timeZone} is used for rendering all kind of date/time/dateTime values, including
      *   {@link java.sql.Date java.sql.Date} and {@link java.sql.Time java.sql.Time}, and then if, for example,
-     *   {@code time_zone} is GMT+00:00, the
+     *   {@code timeZone} is GMT+00:00, the
      *   values from the earlier examples will be shown as 2014-07-11 (one day off) and 09:57:00 (2 hours off). While
      *   those are the time zone correct renderings, those values are probably meant to be shown "as is".
      *
@@ -183,7 +183,7 @@ public interface ProcessingConfiguration {
 
     /**
      * A {@link Map} that associates {@link TemplateNumberFormatFactory}-es to names, which then can be referred by the
-     * {@link #getNumberFormat() number_format} setting with values starting with <code>@<i>name</i></code>. The keys in
+     * {@link #getNumberFormat() numberFormat} setting with values starting with <code>@<i>name</i></code>. The keys in
      * the {@link Map} should start with an UNICODE letter, and should only contain UNICODE letters and digits (not
      * {@code _}), otherwise accessing the custom format from templates can be difficult or impossible. The
      * {@link Configuration}-level default of this setting is an empty  {@link Map}.
@@ -304,14 +304,14 @@ public interface ProcessingConfiguration {
      *                     and {@link java.sql.Time java.sql.Time}, and for {@code "iso"} date values.
      *
      *         <li><p>Time zone options:<br>
-     *             {@code u} = Use UTC instead of what the {@code time_zone} setting suggests. However,
+     *             {@code u} = Use UTC instead of what the {@code timeZone} setting suggests. However,
      *                     {@link java.sql.Date java.sql.Date} and {@link java.sql.Time java.sql.Time} aren't affected
      *                     by this (see {@link #getSQLDateAndTimeTimeZone()} to understand why)<br>
-     *             {@code fu} = "Force UTC", that is, use UTC instead of what the {@code time_zone} or the
-     *                     {@code sql_date_and_time_time_zone} setting suggests. This also effects
+     *             {@code fu} = "Force UTC", that is, use UTC instead of what the {@code timeZone} or the
+     *                     {@code sqlDateAndTimeTimeZone} setting suggests. This also effects
      *                     {@link java.sql.Date java.sql.Date} and {@link java.sql.Time java.sql.Time} values<br>
-     *             Neither = Use the time zone suggested by the {@code time_zone} or the
-     *                     {@code sql_date_and_time_time_zone} configuration setting ({@link #getTimeZone()} and
+     *             Neither = Use the time zone suggested by the {@code timeZone} or the
+     *                     {@code sqlDateAndTimeTimeZone} configuration setting ({@link #getTimeZone()} and
      *                     {@link #getSQLDateAndTimeTimeZone()}).
      *       </ul>
      *
@@ -364,8 +364,8 @@ public interface ProcessingConfiguration {
 
     /**
      * A {@link Map} that associates {@link TemplateDateFormatFactory}-es to names, which then can be referred by the
-     * {@link #getDateFormat() date_format}/{@link #getDateFormat() date_format }/{@link #getDateTimeFormat()
-     * datetime_format} settings with values starting with <code>@<i>name</i></code>. The keys in the {@link Map} should
+     * {@link #getDateFormat() dateFormat}/{@link #getDateFormat() dateFormat }/{@link #getDateTimeFormat()
+     * dateTimeFormat} settings with values starting with <code>@<i>name</i></code>. The keys in the {@link Map} should
      * start with an UNICODE letter, and should only contain UNICODE letters and digits (not {@code _}), otherwise
      * accessing the custom format from templates can be difficult or impossible. The {@link Configuration}-level
      * default of this setting is an empty {@link Map}.

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java b/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
index 43e2902..5ea4517 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
@@ -123,7 +123,6 @@ public class Template implements ProcessingConfiguration, CustomStateScope {
     private Charset actualSourceEncoding;
     private TagSyntax actualTagSyntax;
 
-    private NamingConvention actualNamingConvention;
     // Custom state:
     private final Object customStateMapLock = new Object();
     private final ConcurrentHashMap<CustomStateKey, Object> customStateMap = new ConcurrentHashMap<>(0);
@@ -286,7 +285,7 @@ public class Template implements ProcessingConfiguration, CustomStateScope {
         _NullArgumentException.check("configuration", configuration);
         this.cfg = configuration;
         this.tCfg = templateConfiguration;
-        this.parsingConfiguration = tCfg != null ? new TemplateParsingConfigurationWithFallback(cfg, tCfg) : cfg;
+        this.parsingConfiguration = tCfg != null ? new ParsingConfigurationWithFallback(cfg, tCfg) : cfg;
         this.lookupName = lookupName;
         this.sourceName = sourceName;
 
@@ -319,7 +318,6 @@ public class Template implements ProcessingConfiguration, CustomStateScope {
                     rootElement = null;
                 }
                 actualTagSyntax = parser._getLastTagSyntax();
-                actualNamingConvention = parser._getLastNamingConvention();
             } catch (TokenMgrError exc) {
                 // TokenMgrError VS ParseException is not an interesting difference for the user, so we just convert it
                 // to ParseException
@@ -685,22 +683,11 @@ public class Template implements ProcessingConfiguration, CustomStateScope {
     }
     
     /**
-     * Returns the naming convention the parser has chosen for this template. If it could be determined, it's
-     * {@link NamingConvention#LEGACY} or {@link NamingConvention#CAMEL_CASE}. If it
-     * couldn't be determined (like because there no identifier that's part of the template language was used where
-     * the naming convention matters), this returns whatever the default is in the current configuration, so it's maybe
-     * {@link TagSyntax#AUTO_DETECT}.
-     */
-    public NamingConvention getActualNamingConvention() {
-        return actualNamingConvention;
-    }
-    
-    /**
      * Returns the output format (see {@link Configuration#getOutputFormat()}) used for this template.
      * The output format of a template can come from various places, in order of increasing priority:
      * {@link Configuration#getOutputFormat()}, {@link ParsingConfiguration#getOutputFormat()} (which is usually
      * provided by {@link Configuration#getTemplateConfigurations()}) and the {@code #ftl} header's
-     * {@code output_format} option in the template.
+     * {@code outputFormat} option in the template.
      */
     public OutputFormat getOutputFormat() {
         return outputFormat;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateBooleanFormat.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateBooleanFormat.java b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateBooleanFormat.java
index 52f753d..240b81e 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateBooleanFormat.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateBooleanFormat.java
@@ -66,7 +66,7 @@ final class TemplateBooleanFormat extends TemplateValueFormat {
      * Returns the string to which {@code true} is converted to for human audience, or {@code null} if automatic
      * coercion to string is not allowed. The default value is {@code null}.
      *
-     * <p>This value is deduced from the {@code "boolean_format"} setting.
+     * <p>This value is deduced from the {@code "booleanFormat"} setting.
      * Confusingly, for backward compatibility (at least until 2.4) that defaults to {@code "true,false"}, yet this
      * defaults to {@code null}. That's so because {@code "true,false"} is treated exceptionally, as that default is a
      * historical mistake in FreeMarker, since it targets computer language output, not human writing. Thus it's

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
index 17583e5..3e77e2c 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
@@ -83,7 +83,6 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
     
     private final TemplateLanguage templateLanguage;
     private final TagSyntax tagSyntax;
-    private final NamingConvention namingConvention;
     private final Boolean whitespaceStripping;
     private final AutoEscapingPolicy autoEscapingPolicy;
     private final Boolean recognizeStandardFileExtensions;
@@ -125,7 +124,6 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
 
         templateLanguage = builder.isTemplateLanguageSet() ? builder.getTemplateLanguage() : null;
         tagSyntax = builder.isTagSyntaxSet() ? builder.getTagSyntax() : null;
-        namingConvention = builder.isNamingConventionSet() ? builder.getNamingConvention() : null;
         whitespaceStripping = builder.isWhitespaceStrippingSet() ? builder.getWhitespaceStripping() : null;
         autoEscapingPolicy = builder.isAutoEscapingPolicySet() ? builder.getAutoEscapingPolicy() : null;
         recognizeStandardFileExtensions = builder.isRecognizeStandardFileExtensionsSet() ? builder.getRecognizeStandardFileExtensions() : null;
@@ -161,19 +159,6 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
     }
 
     @Override
-    public NamingConvention getNamingConvention() {
-        if (!isNamingConventionSet()) {
-            throw new CoreSettingValueNotSetException("namingConvention");
-        }
-        return namingConvention;
-    }
-
-    @Override
-    public boolean isNamingConventionSet() {
-        return namingConvention != null;
-    }
-
-    @Override
     public boolean getWhitespaceStripping() {
         if (!isWhitespaceStrippingSet()) {
             throw new CoreSettingValueNotSetException("whitespaceStripping");
@@ -274,6 +259,11 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
     }
 
     @Override
+    public boolean isIncompatibleImprovementsSet() {
+        return false;
+    }
+
+    @Override
     public Locale getLocale() {
         if (!isLocaleSet()) {
             throw new CoreSettingValueNotSetException("locale");
@@ -811,9 +801,6 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
             if (tc.isLocaleSet()) {
                 setLocale(tc.getLocale());
             }
-            if (tc.isNamingConventionSet()) {
-                setNamingConvention(tc.getNamingConvention());
-            }
             if (tc.isNewBuiltinClassResolverSet()) {
                 setNewBuiltinClassResolver(tc.getNewBuiltinClassResolver());
             }
@@ -895,6 +882,11 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
         }
 
         @Override
+        public boolean isIncompatibleImprovementsSet() {
+            return false;
+        }
+
+        @Override
         protected TagSyntax getDefaultTagSyntax() {
             throw new CoreSettingValueNotSetException("tagSyntax");
         }
@@ -905,11 +897,6 @@ public final class TemplateConfiguration implements ParsingAndProcessingConfigur
         }
 
         @Override
-        protected NamingConvention getDefaultNamingConvention() {
-            throw new CoreSettingValueNotSetException("namingConvention");
-        }
-
-        @Override
         protected boolean getDefaultWhitespaceStripping() {
             throw new CoreSettingValueNotSetException("whitespaceStripping");
         }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateExceptionHandler.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateExceptionHandler.java b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateExceptionHandler.java
index 4e5e0b7..477cbf6 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateExceptionHandler.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateExceptionHandler.java
@@ -26,7 +26,7 @@ import java.io.Writer;
 import org.apache.freemarker.core.util._StringUtil;
 
 /**
- * Used for the {@code template_exception_handler} configuration setting;
+ * Used for the {@code templateExceptionHandler} configuration setting;
  * see {@link MutableProcessingConfiguration#setTemplateExceptionHandler(TemplateExceptionHandler)} for more.
  */
 public interface TemplateExceptionHandler {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateParsingConfigurationWithFallback.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateParsingConfigurationWithFallback.java b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateParsingConfigurationWithFallback.java
deleted file mode 100644
index 30414a7..0000000
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateParsingConfigurationWithFallback.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.freemarker.core;
-
-import java.nio.charset.Charset;
-
-import org.apache.freemarker.core.arithmetic.ArithmeticEngine;
-import org.apache.freemarker.core.outputformat.OutputFormat;
-
-/**
- * Adds {@link Configuration} fallback to the {@link ParsingConfiguration} part of a {@link TemplateConfiguration}.
- */
-final class TemplateParsingConfigurationWithFallback implements ParsingConfiguration {
-
-    private final Configuration cfg;
-    private final TemplateConfiguration tCfg;
-
-    TemplateParsingConfigurationWithFallback(Configuration cfg, TemplateConfiguration tCfg) {
-        this.cfg = cfg;
-        this.tCfg = tCfg;
-    }
-
-    @Override
-    public TemplateLanguage getTemplateLanguage() {
-        return tCfg.isTemplateLanguageSet() ? tCfg.getTemplateLanguage() : cfg.getTemplateLanguage();
-    }
-
-    @Override
-    public boolean isTemplateLanguageSet() {
-        return true;
-    }
-
-    @Override
-    public TagSyntax getTagSyntax() {
-        return tCfg.isTagSyntaxSet() ? tCfg.getTagSyntax() : cfg.getTagSyntax();
-    }
-
-    @Override
-    public boolean isTagSyntaxSet() {
-        return true;
-    }
-
-    @Override
-    public NamingConvention getNamingConvention() {
-        return tCfg.isNamingConventionSet() ? tCfg.getNamingConvention() : cfg.getNamingConvention();
-    }
-
-    @Override
-    public boolean isNamingConventionSet() {
-        return true;
-    }
-
-    @Override
-    public boolean getWhitespaceStripping() {
-        return tCfg.isWhitespaceStrippingSet() ? tCfg.getWhitespaceStripping() : cfg.getWhitespaceStripping();
-    }
-
-    @Override
-    public boolean isWhitespaceStrippingSet() {
-        return true;
-    }
-
-    @Override
-    public ArithmeticEngine getArithmeticEngine() {
-        return tCfg.isArithmeticEngineSet() ? tCfg.getArithmeticEngine() : cfg.getArithmeticEngine();
-    }
-
-    @Override
-    public boolean isArithmeticEngineSet() {
-        return true;
-    }
-
-    @Override
-    public AutoEscapingPolicy getAutoEscapingPolicy() {
-        return tCfg.isAutoEscapingPolicySet() ? tCfg.getAutoEscapingPolicy() : cfg.getAutoEscapingPolicy();
-    }
-
-    @Override
-    public boolean isAutoEscapingPolicySet() {
-        return true;
-    }
-
-    @Override
-    public OutputFormat getOutputFormat() {
-        return tCfg.isOutputFormatSet() ? tCfg.getOutputFormat() : cfg.getOutputFormat();
-    }
-
-    @Override
-    public boolean isOutputFormatSet() {
-        return true;
-    }
-
-    @Override
-    public boolean getRecognizeStandardFileExtensions() {
-        return tCfg.isRecognizeStandardFileExtensionsSet() ? tCfg.getRecognizeStandardFileExtensions()
-                : cfg.getRecognizeStandardFileExtensions();
-    }
-
-    @Override
-    public boolean isRecognizeStandardFileExtensionsSet() {
-        return true;
-    }
-
-    @Override
-    public Version getIncompatibleImprovements() {
-        // This can be only set on the Configuration-level
-        return cfg.getIncompatibleImprovements();
-    }
-
-    @Override
-    public int getTabSize() {
-        return tCfg.isTabSizeSet() ? tCfg.getTabSize() : cfg.getTabSize();
-    }
-
-    @Override
-    public boolean isTabSizeSet() {
-        return true;
-    }
-
-    @Override
-    public Charset getSourceEncoding() {
-        return tCfg.isSourceEncodingSet() ? tCfg.getSourceEncoding() : cfg.getSourceEncoding();
-    }
-
-    @Override
-    public boolean isSourceEncodingSet() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java b/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
index 3ebada9..3ff249a 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
@@ -699,9 +699,8 @@ public class _ObjectBuilderSettingEvaluator {
             }
 
             // For accessing static fields:
-            addWithSimpleName(SHORTHANDS, Configuration.class); // [FM3] Won't be needed
+            addWithSimpleName(SHORTHANDS, Configuration.class); // [FM3] Won't be needed?
             addWithSimpleName(SHORTHANDS, TagSyntax.class);
-            addWithSimpleName(SHORTHANDS, NamingConvention.class);
 
         }
         String fullClassName = SHORTHANDS.get(className);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/model/impl/SimpleMethod.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/model/impl/SimpleMethod.java b/freemarker-core/src/main/java/org/apache/freemarker/core/model/impl/SimpleMethod.java
index ae5c531..d891190 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/model/impl/SimpleMethod.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/model/impl/SimpleMethod.java
@@ -41,7 +41,7 @@ import org.apache.freemarker.core.util._ClassUtil;
 class SimpleMethod {
     
     static final String MARKUP_OUTPUT_TO_STRING_TIP
-            = "A markup output value can be converted to markup string like value?markup_string. "
+            = "A markup output value can be converted to markup string like value?markupString. "
               + "But consider if the Java method whose argument it will be can handle markup strings properly.";
     
     private final Member member;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/templateresolver/TemplateResolver.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/templateresolver/TemplateResolver.java b/freemarker-core/src/main/java/org/apache/freemarker/core/templateresolver/TemplateResolver.java
index 0d018eb..debc42d 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/templateresolver/TemplateResolver.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/templateresolver/TemplateResolver.java
@@ -31,7 +31,7 @@ import org.apache.freemarker.core.templateresolver.impl.DefaultTemplateResolver;
 import org.apache.freemarker.core.util._NullArgumentException;
 
 /**
- * This class allows user to fully implement the template lookup, loading and caching logic,
+ * This class allows users to fully implement the template lookup, loading and caching logic,
  * in case the standard mechanism (a {@link DefaultTemplateResolver} combined with all the {@link Configuration}
  * settings like {@link Configuration#getTemplateLoader() templateLoader},
  * {@link Configuration#getTemplateConfigurations() templateConfigurations}, etc.) is not flexible enough.
@@ -45,8 +45,9 @@ import org.apache.freemarker.core.util._NullArgumentException;
  * settings, which should be reflected by the return value of the {@code supportsXxxSetting} methods (like
  * {@link #supportsTemplateLoaderSetting()}). (Note that there's no {@code supportsXxxSetting} method for
  * {@link Configuration#getTemplateLanguage() templateLanguage} and {@link Configuration#getSourceEncoding()
- * sourceEncoding} and these settings are always exposed.) {@link TemplateResolverDependencies} will also expose the
- * {@link TemplateResolverDependencies#parse} method, which is used to create a {@link Template} from its source code.
+ * sourceEncoding}, as the must always be supported and are always exposed.) {@link TemplateResolverDependencies}
+ * will also expose the {@link TemplateResolverDependencies#parse} method, which is used to create a {@link Template}
+ * from its source code in the later {@link #getTemplate(String, Locale, Serializable)} calls.
  */
 public abstract class TemplateResolver {
 
@@ -213,7 +214,7 @@ public abstract class TemplateResolver {
      * {@link Configuration} constructor will throw an exception to tell the user that the {@code templateLoader}
      * setting is not supported by this {@link TemplateResolver} class. Some may feel tempted to return {@code true}
      * to avoid such error, but consider that as the user has explicitly set this setting, they certainly expect it
-     * have an effect, and will be frustrated when its ignored.
+     * have an effect, and will be frustrated when it doesn't have any.
      */
     public abstract boolean supportsTemplateLoaderSetting();
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/util/FTLUtil.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/util/FTLUtil.java b/freemarker-core/src/main/java/org/apache/freemarker/core/util/FTLUtil.java
index 2f94c85..84d1c19 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/util/FTLUtil.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/util/FTLUtil.java
@@ -793,7 +793,7 @@ public final class FTLUtil {
         if (Environment.Namespace.class.isAssignableFrom(cl)) {
             appendTypeName(sb, typeNamesAppended, "namespace");
         } else if (TemplateHashModelEx.class.isAssignableFrom(cl)) {
-            appendTypeName(sb, typeNamesAppended, "extended_hash");
+            appendTypeName(sb, typeNamesAppended, "extendedHash");
         } else if (TemplateHashModel.class.isAssignableFrom(cl)) {
             appendTypeName(sb, typeNamesAppended, "hash");
         }
@@ -815,11 +815,11 @@ public final class FTLUtil {
         }
 
         if (TemplateMarkupOutputModel.class.isAssignableFrom(cl)) {
-            appendTypeName(sb, typeNamesAppended, "markup_output");
+            appendTypeName(sb, typeNamesAppended, "markupOutput");
         }
 
         if (sb.length() == initalLength) {
-            appendTypeName(sb, typeNamesAppended, "misc_template_model");
+            appendTypeName(sb, typeNamesAppended, "miscTemplateModel");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/util/_SortedArraySet.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/util/_SortedArraySet.java b/freemarker-core/src/main/java/org/apache/freemarker/core/util/_SortedArraySet.java
index e60d08d..788fed7 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/util/_SortedArraySet.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/util/_SortedArraySet.java
@@ -28,7 +28,7 @@ public class _SortedArraySet<E> extends _UnmodifiableSet<E> {
 
     private final E[] array;
 
-    public _SortedArraySet(E[] array) {
+    public _SortedArraySet(E... array) {
         this.array = array;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/util/_StringUtil.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/util/_StringUtil.java b/freemarker-core/src/main/java/org/apache/freemarker/core/util/_StringUtil.java
index 98c9f84..08d7870 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/util/_StringUtil.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/util/_StringUtil.java
@@ -30,7 +30,6 @@ import java.util.StringTokenizer;
 import java.util.regex.Pattern;
 
 import org.apache.freemarker.core.Environment;
-import org.apache.freemarker.core.NamingConvention;
 import org.apache.freemarker.core.Template;
 import org.apache.freemarker.core.Version;
 
@@ -771,7 +770,7 @@ public class _StringUtil {
      * touching pieces that were escaped with this, no character sequence can occur that closes the
      * JavaScript/JSON string literal, or has a meaning in HTML/XML that causes the HTML script section to be closed.
      * (If, however, the escaped section is preceded by or followed by strings from other sources, this can't be
-     * guaranteed in some rare cases. Like <tt>x = "&lt;/${a?js_string}"</tt> might closes the "script"
+     * guaranteed in some rare cases. Like <tt>x = "&lt;/${a?jsString}"</tt> might closes the "script"
      * element if {@code a} is {@code "script>"}.)
      * 
      * The escaped characters are:
@@ -1574,24 +1573,6 @@ public class _StringUtil {
         }
     }
 
-    /**
-     * @return {@link NamingConvention#CAMEL_CASE}, or {@link NamingConvention#LEGACY}
-     *         or, {@link NamingConvention#AUTO_DETECT} when undecidable.
-     */
-    public static NamingConvention getIdentifierNamingConvention(String name) {
-        final int ln = name.length();
-        for (int i = 0; i < ln; i++) {
-            final char c = name.charAt(i);
-            if (c == '_') {
-                return NamingConvention.LEGACY;
-            }
-            if (_StringUtil.isUpperUSASCII(c)) {
-                return NamingConvention.CAMEL_CASE;
-            }
-        }
-        return NamingConvention.AUTO_DETECT;
-    }
-
     // [2.4] Won't be needed anymore
     /**
      * A deliberately very inflexible camel case to underscored converter; it must not convert improper camel case

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/javacc/FTL.jj
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/javacc/FTL.jj b/freemarker-core/src/main/javacc/FTL.jj
index 6b7893c..c289b74 100644
--- a/freemarker-core/src/main/javacc/FTL.jj
+++ b/freemarker-core/src/main/javacc/FTL.jj
@@ -155,9 +155,6 @@ public class FMParser {
             throw new BugException("Unsupported tagSyntax: " + tagSyntax);
         }
 
-        token_source.initialNamingConvention = pCfg.getNamingConvention();
-        token_source.namingConvention = token_source.initialNamingConvention;
-
         this.stripWhitespace = pCfg.getWhitespaceStripping();
 
         // If this is a Template under construction, we do the below.
@@ -169,9 +166,6 @@ public class FMParser {
     }
     
     void setupStringLiteralMode(FMParserTokenManager parentTokenSource, OutputFormat outputFormat) {
-        token_source.initialNamingConvention = parentTokenSource.initialNamingConvention;
-        token_source.namingConvention = parentTokenSource.namingConvention;
-        token_source.namingConventionEstabilisher = parentTokenSource.namingConventionEstabilisher;
         token_source.SwitchTo(NODIRECTIVE);
         
         this.outputFormat = outputFormat;
@@ -179,8 +173,7 @@ public class FMParser {
     }
 
     void tearDownStringLiteralMode(FMParserTokenManager parentTokenSource) {
-        parentTokenSource.namingConvention = token_source.namingConvention;
-        parentTokenSource.namingConventionEstabilisher = token_source.namingConventionEstabilisher;
+        // Nothing to do ATM
     }
 
     private OutputFormat getFormatFromStdFileExt() {
@@ -248,15 +241,6 @@ public class FMParser {
     public TagSyntax _getLastTagSyntax() {
         return token_source.squBracTagSyntax ? TagSyntax.SQUARE_BRACKET : TagSyntax.ANGLE_BRACKET;
     }
-    
-    /**
-     * Don't use it, unless you are developing FreeMarker itself.
-     * The naming convention used by this template; if it couldn't be detected so far, it will be the most probable one.
-     * This could be used for formatting error messages, but not for anything serious.
-     */
-    public NamingConvention _getLastNamingConvention() {
-        return token_source.namingConvention;
-    }
 
     /**
      * Throw an exception if the expression passed in is a String Literal
@@ -470,11 +454,12 @@ TOKEN_MGR_DECLS:
                 + "so maybe you need to upgrade FreeMarker.)";
 
     /**
-     * The noparseTag is set when we enter a block of text that the parser more or less ignores. These are <noparse> and
+     * The noParseTag is set when we enter a block of text that the parser more or less ignores. These are <#noParse>
+      a    nd
      * <#-- ... --->. This variable tells us what the closing tag should be, and when we hit that, we resume parsing.
-     * Note that with this scheme, <noparse> tags and comments cannot nest recursively.
+     * Note that with this scheme, <#noParse> tags and comments cannot nest recursively.
      */
-    String noparseTag;
+    String noParseTag;
 
     /**
      * Keeps track of how deeply nested we have the hash literals. This is necessary since we need to be able to
@@ -490,9 +475,6 @@ TOKEN_MGR_DECLS:
             autodetectTagSyntax,
             directiveSyntaxEstablished,
             inInvocation;
-    NamingConvention initialNamingConvention;
-    NamingConvention namingConvention;
-    Token namingConventionEstabilisher;
     int incompatibleImprovements;
 
     void setParser(FMParser parser) {
@@ -503,7 +485,7 @@ TOKEN_MGR_DECLS:
      * This method handles tag syntax ('<' VS '['), and also participates in naming convention detection.
      * If you update this logic, take a look at the UNKNOWN_DIRECTIVE token too. 
      */
-    private void handleTagSyntaxAndSwitch(Token tok, NamingConvention tokenNamingConvention, int newLexState) {
+    private void handleTagSyntaxAndSwitch(Token tok, int newLexState) {
         final String image = tok.image;
         
         char firstChar = image.charAt(0);
@@ -517,70 +499,9 @@ TOKEN_MGR_DECLS:
         
         directiveSyntaxEstablished = true;
         
-        checkNamingConvention(tok, tokenNamingConvention);
-        
         SwitchTo(newLexState);
     }
 
-    /**
-     * Used for tags whose name isn't affected by naming convention.
-     */
-    private void handleTagSyntaxAndSwitch(Token tok, int newLexState) {
-        handleTagSyntaxAndSwitch(tok, NamingConvention.AUTO_DETECT, newLexState);
-    }
-
-    void checkNamingConvention(Token tok) {
-        checkNamingConvention(tok, _StringUtil.getIdentifierNamingConvention(tok.image)); 
-    }
-    
-    void checkNamingConvention(Token tok, NamingConvention tokenNamingConvention) {
-        if (tokenNamingConvention != NamingConvention.AUTO_DETECT) {
-	        if (namingConvention == NamingConvention.AUTO_DETECT) {
-	            namingConvention = tokenNamingConvention;
-	            namingConventionEstabilisher = tok;
-	        } else if (namingConvention != tokenNamingConvention) {
-                throw newNameConventionMismatchException(tok);
-	        }
-        }
-    }
-    
-    private TokenMgrError newNameConventionMismatchException(Token tok) {
-        return new TokenMgrError(
-                "Naming convention mismatch. "
-                + "Identifiers that are part of the template language (not the user specified ones) "
-                + (initialNamingConvention == NamingConvention.AUTO_DETECT
-                    ? "must consistently use the same naming convention within the same template. This template uses "
-                    : "must use the configured naming convention, which is the ")
-                + (namingConvention == NamingConvention.CAMEL_CASE
-                            ? "camel case naming convention (like: exampleName) "
-                            : (namingConvention == NamingConvention.LEGACY
-                                    ? "legacy naming convention (directive (tag) names are like examplename, " 
-                                      + "everything else is like example_name) "
-                                    : "??? (internal error)"
-                                    ))
-                + (namingConventionEstabilisher != null
-                        ? "estabilished by auto-detection at "
-                            + MessageUtil.formatPosition(
-                                    namingConventionEstabilisher.beginLine, namingConventionEstabilisher.beginColumn)
-                            + " by token " + _StringUtil.jQuote(namingConventionEstabilisher.image.trim())
-                        : "")
-                + ", but the problematic token, " + _StringUtil.jQuote(tok.image.trim())
-                + ", uses a different convention.",
-                TokenMgrError.LEXICAL_ERROR,
-                tok.beginLine, tok.beginColumn, tok.endLine, tok.endColumn);
-    }
-
-    /**
-     * Detects the naming convention used, both in start- and end-tag tokens.
-     *
-     * @param charIdxInName
-     *         The index of the deciding character relatively to the first letter of the name.
-     */
-    private static NamingConvention getTagNamingConvention(Token tok, int charIdxInName) {
-        return _StringUtil.isUpperUSASCII(getTagNameCharAt(tok, charIdxInName))
-                ? NamingConvention.CAMEL_CASE : NamingConvention.LEGACY;
-    }
-
     static char getTagNameCharAt(Token tok, int charIdxInName) {
         final String image = tok.image;
         
@@ -739,8 +660,8 @@ TOKEN:
     |
     <IF : <START_TAG> "if" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
     |
-    <ELSE_IF : <START_TAG> "else" ("i" | "I") "f" <BLANK>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), FM_EXPRESSION);
+    <ELSE_IF : <START_TAG> "elseIf" <BLANK>> {
+        handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION);
     }
     |
     <LIST : <START_TAG> "list" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
@@ -775,26 +696,25 @@ TOKEN:
     |
     <SETTING : <START_TAG> "setting" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
     |
-    <OUTPUTFORMAT : <START_TAG> "output" ("f"|"F") "ormat" <BLANK>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 6), FM_EXPRESSION);
+    <OUTPUTFORMAT : <START_TAG> "outputFormat" <BLANK>> {
+        handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION);
     }
     |
-    <AUTOESC : <START_TAG> "auto" ("e"|"E") "sc" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), DEFAULT);
+    <AUTOESC : <START_TAG> "autoEsc" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
-    <NOAUTOESC : <START_TAG> "no" ("autoe"|"AutoE") "sc" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
+    <NOAUTOESC : <START_TAG> "noAutoEsc" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
     <COMPRESS : <START_TAG> "compress" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
     |
-    <TERSE_COMMENT : ("<" | "[") "#--" > { noparseTag = "-->"; handleTagSyntaxAndSwitch(matchedToken, NO_PARSE); }
+    <TERSE_COMMENT : ("<" | "[") "#--" > { noParseTag = "-->"; handleTagSyntaxAndSwitch(matchedToken, NO_PARSE); }
     |
-    <NOPARSE: <START_TAG> "no" ("p" | "P") "arse" <CLOSE_TAG1>> {
-        NamingConvention tagNamingConvention = getTagNamingConvention(matchedToken, 2);
-        handleTagSyntaxAndSwitch(matchedToken, tagNamingConvention, NO_PARSE);
-        noparseTag = tagNamingConvention == NamingConvention.CAMEL_CASE ? "noParse" : "noparse";
+    <NOPARSE: <START_TAG> "noParse" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, NO_PARSE);
+        noParseTag = "noParse";
     }
     |
     <END_IF : <END_TAG> "if" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
@@ -817,16 +737,16 @@ TOKEN:
     |
     <END_MACRO : <END_TAG> "macro" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
     |
-    <END_OUTPUTFORMAT : <END_TAG> "output" ("f" | "F") "ormat" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 6), DEFAULT);
+    <END_OUTPUTFORMAT : <END_TAG> "outputFormat" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
-    <END_AUTOESC : <END_TAG> "auto" ("e" | "E") "sc" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), DEFAULT);
+    <END_AUTOESC : <END_TAG> "autoEsc" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
     <END_NOAUTOESC : <END_TAG> "no" ("autoe"|"AutoE") "sc" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
     <END_COMPRESS : <END_TAG> "compress" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
@@ -867,12 +787,12 @@ TOKEN:
     |
     <END_ESCAPE : <END_TAG> "escape" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
     |
-    <NOESCAPE : <START_TAG> "no" ("e" | "E") "scape" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
+    <NOESCAPE : <START_TAG> "noEscape" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
-    <END_NOESCAPE : <END_TAG> "no" ("e" | "E") "scape" <CLOSE_TAG1>> {
-        handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
+    <END_NOESCAPE : <END_TAG> "noEscape" <CLOSE_TAG1>> {
+        handleTagSyntaxAndSwitch(matchedToken, DEFAULT);
     }
     |
     <UNIFIED_CALL : "<@" | "[@" > { unifiedCall(matchedToken); }
@@ -908,7 +828,7 @@ TOKEN:
             // doesn't match any directive starter tokens, because that token requires whitespace after the
             // name as it should be followed by parameters. For now we work this around so we don't report
             // unknown directive:
-            if (ASTDirective.ALL_BUILT_IN_DIRECTIVE_NAMES.contains(dn)) {
+            if (ASTDirective.BUILT_IN_DIRECTIVE_NAMES.contains(dn)) {
                 throw new TokenMgrError(
                         "#" + dn + " is an existing directive, but the tag is malformed. " 
                         + " (See FreeMarker Manual / Directive Reference.)",
@@ -922,9 +842,9 @@ TOKEN:
                 tip = "Use #assign or #local or #global, depending on the intented scope "
                       + "(#assign is template-scope). " + PLANNED_DIRECTIVE_HINT;
             } else if (dn.equals("else_if") || dn.equals("elif")) {
-            	tip = "Use #elseif.";
+            	tip = "Use #elseIf.";
             } else if (dn.equals("no_escape")) {
-            	tip = "Use #noescape instead.";
+            	tip = "Use #noEscape instead.";
             } else if (dn.equals("method")) {
             	tip = "Use #function instead.";
             } else if (dn.equals("head") || dn.equals("template") || dn.equals("fm")) {
@@ -1351,7 +1271,7 @@ TOKEN:
 {
     <TERSE_COMMENT_END : "-->" | "--]">
     {
-        if (noparseTag.equals("-->")) {
+        if (noParseTag.equals("-->")) {
             boolean squareBracket = matchedToken.image.endsWith("]");
             if ((squBracTagSyntax && squareBracket) || (!squBracTagSyntax && !squareBracket)) {
                 matchedToken.image = matchedToken.image + ";"; 
@@ -1369,7 +1289,7 @@ TOKEN:
     >
     {
         StringTokenizer st = new StringTokenizer(image.toString(), " \t\n\r<>[]/#", false);
-        if (st.nextToken().equals(noparseTag)) {
+        if (st.nextToken().equals(noParseTag)) {
             matchedToken.image = matchedToken.image + ";"; 
             SwitchTo(DEFAULT);
         }
@@ -1833,13 +1753,12 @@ ASTExpBuiltInVariable ASTExpBuiltInVariable() :
     name = <ID>
     {
         ASTExpBuiltInVariable result = null;
-        token_source.checkNamingConvention(name);
 
         TemplateModel parseTimeValue;
         String nameStr = name.image;
-        if (nameStr.equals(ASTExpBuiltInVariable.OUTPUT_FORMAT) || nameStr.equals(ASTExpBuiltInVariable.OUTPUT_FORMAT_CC)) {
+        if (nameStr.equals(ASTExpBuiltInVariable.OUTPUT_FORMAT)) {
             parseTimeValue = new SimpleScalar(outputFormat.getName());
-        } else if (nameStr.equals(ASTExpBuiltInVariable.AUTO_ESC) || nameStr.equals(ASTExpBuiltInVariable.AUTO_ESC_CC)) {
+        } else if (nameStr.equals(ASTExpBuiltInVariable.AUTO_ESC)) {
             parseTimeValue = autoEscaping ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE;
         } else {
             parseTimeValue = null;
@@ -1933,7 +1852,6 @@ ASTExpression ASTExpBuiltIn(ASTExpression lhoExp) :
     <BUILT_IN>
     t = <ID>
     {
-        token_source.checkNamingConvention(t);
         result = ASTExpBuiltIn.newBuiltIn(incompatibleImprovements, lhoExp, t, token_source);
         result.setLocation(template, lhoExp, t);
         
@@ -2856,7 +2774,6 @@ ASTDirInclude Include() :
         {
             String attString = att.image;
             if (attString.equalsIgnoreCase("ignore_missing") || attString.equals("ignoreMissing")) {
-                token_source.checkNamingConvention(att);
             	ignoreMissingExp = exp;
             } else {
                 String correctedName = attString.equals("ignoreMissing") ? "ignore_missing" : null;
@@ -3306,7 +3223,7 @@ ASTDirNoEscape NoEscape() :
     start = <NOESCAPE>
     {
         if (escapes.isEmpty()) {
-            throw new ParseException("#noescape with no matching #escape encountered.", template, start);
+            throw new ParseException("#noEscape with no matching #escape encountered.", template, start);
         }
         Object escape = escapes.removeFirst();
     }
@@ -3490,7 +3407,6 @@ ASTDirSetting Setting() :
     value = ASTExpression()
     end = LooseDirectiveEnd()
     {
-        token_source.checkNamingConvention(key);
         ASTDirSetting result = new ASTDirSetting(key, token_source, value, template.getConfiguration());
         result.setLocation(template, start, end);
         return result;
@@ -3623,7 +3539,7 @@ ASTStaticText WhitespaceText() :
 
 /**
  * Production for dealing with unparsed content,
- * i.e. what is inside a comment or noparse tag.
+ * i.e. what is inside a comment or noParse tag.
  * It returns the ending token. The content
  * of the tag is put in buf.
  */
@@ -3829,8 +3745,6 @@ void HeaderElement() :
                 <EQUALS>
                 exp = ASTExpression()
                 {
-                    token_source.checkNamingConvention(key);
-                
                     String ks = key.image;
                     TemplateModel value = null;
                     try {
@@ -3872,11 +3786,11 @@ void HeaderElement() :
                                 streamToUnmarkWhenEncEstabd.mark(0);
                                 streamToUnmarkWhenEncEstabd = null;
                             }
-                        } else if (ks.equalsIgnoreCase("STRIP_WHITESPACE") || ks.equals("stripWhitespace")) {
+                        } else if (ks.equals("stripWhitespace")) {
                             this.stripWhitespace = getBoolean(exp, true);
-                        } else if (ks.equalsIgnoreCase("STRIP_TEXT") || ks.equals("stripText")) {
+                        } else if (ks.equals("stripText")) {
                             this.stripText = getBoolean(exp, true);
-                        } else if (ks.equalsIgnoreCase("auto_esc") || ks.equals("autoEsc")) {
+                        } else if (ks.equals("autoEsc")) {
                             if (getBoolean(exp, false)) {
                                 autoEscRequester = key;
                                 autoEscapingPolicy = AutoEscapingPolicy.ENABLE_IF_SUPPORTED;
@@ -3886,7 +3800,7 @@ void HeaderElement() :
                             recalculateAutoEscapingField();
 
                             template.setAutoEscapingPolicy(autoEscapingPolicy);
-                        } else if (ks.equalsIgnoreCase("output_format") || ks.equals("outputFormat")) {
+                        } else if (ks.equals("outputFormat")) {
                             if (vs == null) {
                                 throw new ParseException("Expected a string constant for \"" + ks + "\".", exp);
                             }
@@ -3900,7 +3814,7 @@ void HeaderElement() :
                             recalculateAutoEscapingField();
 
                             template.setOutputFormat(outputFormat);
-                        } else if (ks.equalsIgnoreCase("ns_prefixes") || ks.equals("nsPrefixes")) {
+                        } else if (ks.equals("nsPrefixes")) {
                             if (!(value instanceof TemplateHashModelEx)) {
                                 throw new ParseException("Expecting a hash of prefixes to namespace URI's.", exp);
                             }
@@ -3922,7 +3836,7 @@ void HeaderElement() :
                                 }
                             } catch (TemplateModelException tme) {
                             }
-                        } else if (ks.equalsIgnoreCase("custom_settings") || ks.equals("customSettings")) {
+                        } else if (ks.equals("customSettings")) {
                             if (!(value instanceof TemplateHashModelEx)) {
                                 throw new ParseException("Expecting a hash value for custom settings.", exp);
                             }
@@ -3944,19 +3858,31 @@ void HeaderElement() :
                             }
                         } else {
                             String correctName;
-	                        if (ks.equals("charset") || ks.equals("source_encoding") || ks.equals("sourceEncoding")) {
+                            String ksLC = ks.toLowerCase();
+	                        if (ksLC.equals("charset") || ksLC.equals("source_encoding")
+	                                || ksLC.equals("sourcerncoding")) {
 	                            correctName = "encoding";
-	                        } else if (ks.equals("attributes")) {
-	                            correctName = token_source.namingConvention == NamingConvention.CAMEL_CASE
-	                                    ? "customSettings" : "custom_settings";
-	                        } else if (ks.equals("xmlns")) {
-	                            // [2.4] If camel case will be the default, update this
-                                correctName
-                                        = token_source.namingConvention == NamingConvention.CAMEL_CASE
-                                                ? "nsPrefixes" : "ns_prefixes";
-                            } else if (ks.equals("auto_escape") || ks.equals("auto_escaping") || ks.equals("autoesc")) {
-                                correctName = "auto_esc";
-                            } else if (ks.equals("autoEscape") || ks.equals("autoEscaping")) {
+	                        } else if (ksLC.equals("attributes") || ksLC.equals("customsettings")
+	                                || ksLC.equals("custom_settings") || ksLC.equals("settings")) {
+	                            correctName = "customSettings";
+	                        } else if (ksLC.equalsIgnoreCase("strip_whitespace")
+	                                || ksLC.equalsIgnoreCase("stripwhitespace")
+	                                || ksLC.equalsIgnoreCase("remove_whitespace")
+	                                || ksLC.equalsIgnoreCase("removewhitespace")) {
+	                            correctName = "stripWhitespace";
+	                        } else if (ksLC.equalsIgnoreCase("strip_text") || ksLC.equalsIgnoreCase("striptext")
+	                                || ksLC.equalsIgnoreCase("remove_text") || ksLC.equalsIgnoreCase("removetext")) {
+	                            correctName = "stripText";
+	                        } else if (ksLC.equals("xmlns") || ksLC.equalsIgnoreCase("ns_prefixes")
+	                                || ksLC.equalsIgnoreCase("nsprefixes")) {
+                                correctName = "nsPrefixes";
+	                        } else if (ksLC.equalsIgnoreCase("output_format")
+	                                || ksLC.equalsIgnoreCase("outputformat")) {
+                                correctName = "outputFormat";
+                            } else if (ksLC.equals("autoEscape") || ksLC.equals("autoEscaping")
+                                    || ksLC.equals("autoesc")
+                                    || ksLC.equals("auto_escape") || ksLC.equals("auto_escaping")
+                                    || ksLC.equalsIgnoreCase("auto_esc")) {
                                 correctName = "autoEsc";
 	                        } else {
                                 correctName = null;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/misc/overloadedNumberRules/generator.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/misc/overloadedNumberRules/generator.ftl b/freemarker-core/src/main/misc/overloadedNumberRules/generator.ftl
index 2a2bfde..4a241b6 100644
--- a/freemarker-core/src/main/misc/overloadedNumberRules/generator.ftl
+++ b/freemarker-core/src/main/misc/overloadedNumberRules/generator.ftl
@@ -68,7 +68,7 @@
 <#function toPrice cellValue, boost>
     <#if cellValue?starts_with("BC ")>
         <#local cellValue = cellValue[3..]>
-    <#elseif cellValue == '-' || cellValue == 'N/A'>
+    <#elseIf cellValue == '-' || cellValue == 'N/A'>
         <#return 'Integer.MAX_VALUE'>
     </#if>
     <#local cellValue = cellValue?number>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMSiblingTest.java
----------------------------------------------------------------------
diff --git a/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMSiblingTest.java b/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMSiblingTest.java
index ed6d7bb..af874fa 100644
--- a/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMSiblingTest.java
+++ b/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMSiblingTest.java
@@ -40,7 +40,6 @@ public class DOMSiblingTest extends TemplateTest {
     @Test
     public void testBlankPreviousSibling() throws IOException, TemplateException {
         assertOutput("${doc.person.name?previousSibling}", "\n    ");
-        assertOutput("${doc.person.name?previous_sibling}", "\n    ");
     }
 
     @Test
@@ -51,7 +50,6 @@ public class DOMSiblingTest extends TemplateTest {
     @Test
     public void testBlankNextSibling() throws IOException, TemplateException {
         assertOutput("${doc.person.name?nextSibling}", "\n    ");
-        assertOutput("${doc.person.name?next_sibling}", "\n    ");
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMTest.java
----------------------------------------------------------------------
diff --git a/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMTest.java b/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMTest.java
index 0d03dbe..36f7226 100644
--- a/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMTest.java
+++ b/freemarker-dom/src/test/java/org/apache/freemarker/dom/DOMTest.java
@@ -50,7 +50,7 @@ public class DOMTest extends TemplateTest {
         addDocToDataModel("<root xmlns='http://example.com/ns1' xmlns:ns2='http://example.com/ns2'>"
                 + "<a>A</a><ns2:b>B</ns2:b><c a1='1' ns2:a2='2'/></root>");
 
-        String ftlHeader = "<#ftl ns_prefixes={'D':'http://example.com/ns1', 'n2':'http://example.com/ns2'}>";
+        String ftlHeader = "<#ftl nsPrefixes={'D':'http://example.com/ns1', 'n2':'http://example.com/ns2'}>";
         
         // @@markup:
         assertOutput("${doc.@@markup}",
@@ -61,7 +61,7 @@ public class DOMTest extends TemplateTest {
                 + "${doc.@@markup}",
                 "<root xmlns=\"http://example.com/ns1\" xmlns:n2=\"http://example.com/ns2\">"
                 + "<a>A</a><n2:b>B</n2:b><c a1=\"1\" n2:a2=\"2\" /></root>");
-        assertOutput("<#ftl ns_prefixes={'D':'http://example.com/ns1'}>"
+        assertOutput("<#ftl nsPrefixes={'D':'http://example.com/ns1'}>"
                 + "${doc.@@markup}",
                 "<root xmlns=\"http://example.com/ns1\" xmlns:a=\"http://example.com/ns2\">"
                 + "<a>A</a><a:b>B</a:b><c a1=\"1\" a:a2=\"2\" /></root>");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/testcases.xml
----------------------------------------------------------------------
diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/testcases.xml b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/testcases.xml
index ffb42c3..5c32215 100644
--- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/testcases.xml
+++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/testcases.xml
@@ -33,26 +33,26 @@
      
  <!ELEMENT setting EMPTY>
      <!ATTLIST setting 
-            auto_import CDATA #IMPLIED
-            source_encoding CDATA #IMPLIED
+            autoImports CDATA #IMPLIED
+            sourceEncoding CDATA #IMPLIED
             locale CDATA #IMPLIED
-            object_wrapper CDATA #IMPLIED
-            output_encoding CDATA #IMPLIED
+            objectWrapper CDATA #IMPLIED
+            outputEncoding CDATA #IMPLIED
             output_dir CDATA #IMPLIED
-            new_builtin_class_resolver CDATA #IMPLIED
-            url_escaping_charset CDATA #IMPLIED
-            incompatible_improvements CDATA #IMPLIED
-            time_zone CDATA #IMPLIED
-            api_builtin_enabled CDATA #IMPLIED
+            newBuiltinClassResolver CDATA #IMPLIED
+            urlEscapingCharset CDATA #IMPLIED
+            incompatibleImprovements CDATA #IMPLIED
+            timeZone CDATA #IMPLIED
+            apiBuiltinEnabled CDATA #IMPLIED
       >
 ]>
 <!--
-Note that for the incompatible_improvements setting you can specify a list of versions, for example:
-<setting incompatible_improvements="min, 3.0.5, max" /> 
+Note that for the incompatibleImprovements setting you can specify a list of versions, for example:
+<setting incompatibleImprovements="min, 3.0.5, max" />
 -->
 
 <testCases>
-   <setting source_encoding="UTF-8" output_encoding="UTF-8" />
+   <setting sourceEncoding="UTF-8" outputEncoding="UTF-8" />
 
    <testCase name="default-xmlns" />
    <testCase name="xml-fragment" />

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/FreemarkerServlet.java
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/FreemarkerServlet.java b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/FreemarkerServlet.java
index b92f2bd..181d0ab 100644
--- a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/FreemarkerServlet.java
+++ b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/FreemarkerServlet.java
@@ -125,9 +125,9 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
  * Also, you can prepend it with {@code classpath:}, like in <tt>classpath:com/example/templates</tt>, to indicate that
  * you want to load templates from the specified package accessible through the Thread Context Class Loader of the
  * thread that initializes this servlet.<br>
- * If {@code incompatible_improvements} is set to 2.3.22 (or higher), you can specify multiple comma separated locations
+ * If {@code incompatibleImprovements} is set to 2.3.22 (or higher), you can specify multiple comma separated locations
  * inside square brackets, like: {@code [ WEB-INF/templates, classpath:com/example/myapp/templates ]}. This internally
- * creates a {@link MultiTemplateLoader}. Note again that if {@code incompatible_improvements} isn't set to at least
+ * creates a {@link MultiTemplateLoader}. Note again that if {@code incompatibleImprovements} isn't set to at least
  * 2.3.22, the initial {@code [} has no special meaning, and so this feature is unavailable.<br>
  * Any of the above can have a {@code ?setting(name=value, ...)} postfix to set the JavaBeans properties of the
  * {@link TemplateLoader} created. For example,
@@ -266,7 +266,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
  * <li>The following init-params are supported only for backward compatibility, and their usage is discouraged:
  * {@code TemplateUpdateInterval}, {@code DefaultEncoding}, {@code ObjectWrapper}, {@code TemplateExceptionHandler}.
  * Instead, use init-params with the setting names documented at
- * {@link ExtendableBuilder#setSetting(String, String)}, such as {@code object_wrapper}.
+ * {@link ExtendableBuilder#setSetting(String, String)}, such as {@code objectWrapper}.
  * 
  * <li><strong>Any other init-params</strong> will be interpreted as {@link Configuration}-level FreeMarker setting. See
  * the possible names and values at {@link ExtendableBuilder#setSetting(String, String)}. Note that
@@ -312,11 +312,11 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
  * <li>If the template contains parsing errors, it will log it with error level, then the servlet throws
  * {@link ServletException} to the servlet container (with the proper cause exception).</li>
  * 
- * <li>If the template throws exception during its execution, and the value of the {@code template_exception_handler}
+ * <li>If the template throws exception during its execution, and the value of the {@code templateExceptionHandler}
  * init-param is {@code rethrow} (recommended), it will log it with error level and then the servlet throws
  * {@link ServletException} to the servlet container (with the proper cause exception). But beware, the default value of
- * the {@code template_exception_handler} init-param is {@code html_debug}, which is for development only! Set it to
- * {@code rethrow} for production. The {@code html_debug} (and {@code debug}) handlers will print error details to the
+ * the {@code templateExceptionHandler} init-param is {@code htmlDebug}, which is for development only! Set it to
+ * {@code rethrow} for production. The {@code htmlDebug} (and {@code debug}) handlers will print error details to the
  * page and then commit the HTTP response with response code 200 "OK", thus, the server wont be able roll back the
  * response and send back an HTTP 500 page. This is so that the template developers will see the error without digging
  * the logs.
@@ -535,7 +535,7 @@ public class FreemarkerServlet extends HttpServlet {
 
         contentType = DEFAULT_CONTENT_TYPE;
 
-        // Process object_wrapper init-param out of order:
+        // Process objectWrapper init-param out of order:
         String objectWrapperInitParamValue = getInitParameter(
                 Configuration.Builder.OBJECT_WRAPPER_KEY, DEPR_INITPARAM_OBJECT_WRAPPER);
         if (objectWrapperInitParamValue != null) {
@@ -1165,7 +1165,7 @@ public class FreemarkerServlet extends HttpServlet {
      * interpret yourself, otherwise fall back to the super method. This method won't be called if there's not
      * init-param that specifies the object wrapper.
      * <p>
-     * The default implementation interprets the {@code object_wrapper} servlet init-param with
+     * The default implementation interprets the {@code objectWrapper} servlet init-param with
      * calling {@link MutableProcessingConfiguration#setSetting(String, String)}.
      *
      * @param initParamValue Not {@code null}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/basic/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/basic/WEB-INF/web.xml b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/basic/WEB-INF/web.xml
index 8a5cba7..3aa634f 100644
--- a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/basic/WEB-INF/web.xml
+++ b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/basic/WEB-INF/web.xml
@@ -56,18 +56,18 @@
 
 		<!-- FreeMarker settings: -->
 		<init-param>
-			<param-name>incompatible_improvements</param-name>
+			<param-name>incompatibleImprovements</param-name>
 			<param-value>3.0.0</param-value>
             <!-- Recommended to set to a high value. For the details, see the Java API docs of
                  freemarker.template.Configuration#Configuration(Version). -->
 		</init-param>
 		<init-param>
-			<param-name>template_exception_handler</param-name>
-			<!-- Some may prefer "html_debug" for development. -->
+			<param-name>templateExceptionHandler</param-name>
+			<!-- Some may prefer "htmlDebug" for development. -->
 			<param-value>rethrow</param-value>
 		</init-param>
 		<init-param>
-			<param-name>template_update_delay</param-name>
+			<param-name>templateUpdateDelay</param-name>
 			<param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
 		</init-param>
 		<init-param>
@@ -79,7 +79,7 @@
             <param-value>en_US</param-value>
         </init-param>
 		<init-param>
-			<param-name>number_format</param-name>
+			<param-name>numberFormat</param-name>
 			<param-value>0.##########</param-value>
 		</init-param>
 
@@ -92,11 +92,11 @@
         
         <!-- Specific parts: -->
         <init-param>
-            <param-name>incompatible_improvements</param-name>
+            <param-name>incompatibleImprovements</param-name>
             <param-value>3.0.0</param-value>
         </init-param>
         <init-param>
-            <param-name>object_wrapper</param-name>
+            <param-name>objectWrapper</param-name>
             <param-value>DefaultObjectWrapper(3.0.0)</param-value>
         </init-param>
         
@@ -114,8 +114,8 @@
             <param-value>UTF-8</param-value> <!-- The encoding of the template files. -->
         </init-param>
         <init-param>
-            <param-name>template_exception_handler</param-name>
-            <!-- Some may prefer "html_debug" for development. -->
+            <param-name>templateExceptionHandler</param-name>
+            <!-- Some may prefer "htmlDebug" for development. -->
             <param-value>rethrow</param-value>
         </init-param>
     </servlet>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/config/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/config/WEB-INF/web.xml b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/config/WEB-INF/web.xml
index d092395..7a4ad23 100644
--- a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/config/WEB-INF/web.xml
+++ b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/config/WEB-INF/web.xml
@@ -89,7 +89,7 @@
         <servlet-name>freemarker-assertDefaultsFreemarkerServlet</servlet-name>
         <servlet-class>org.apache.freemarker.servlet.jsp.RealServletContainertTest$AssertDefaultsFreemarkerServlet</servlet-class>
         <init-param>
-            <param-name>incompatible_improvements</param-name>
+            <param-name>incompatibleImprovements</param-name>
             <param-value>3.0.0</param-value>
         </init-param>
     </servlet>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/errors/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/errors/WEB-INF/web.xml b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/errors/WEB-INF/web.xml
index 1df86c3..1ec62fb 100644
--- a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/errors/WEB-INF/web.xml
+++ b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/errors/WEB-INF/web.xml
@@ -43,8 +43,8 @@
 
         <!-- This is the default anyway:
 		<init-param>
-			<param-name>template_exception_handler</param-name>
-			<param-value>html_debug</param-value>
+			<param-name>templateExceptionHandler</param-name>
+			<param-value>htmlDebug</param-value>
 		</init-param>
         -->
 
@@ -61,7 +61,7 @@
         </init-param>
 
         <init-param>
-            <param-name>template_exception_handler</param-name>
+            <param-name>templateExceptionHandler</param-name>
             <param-value>rethrow</param-value>
         </init-param>
 
@@ -82,7 +82,7 @@
         </init-param>
 
         <init-param>
-            <param-name>template_exception_handler</param-name>
+            <param-name>templateExceptionHandler</param-name>
             <param-value>rethrow</param-value>
         </init-param>
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/multipleLoaders/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/multipleLoaders/WEB-INF/web.xml b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/multipleLoaders/WEB-INF/web.xml
index cc3df47..37978c1 100644
--- a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/multipleLoaders/WEB-INF/web.xml
+++ b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/multipleLoaders/WEB-INF/web.xml
@@ -42,12 +42,12 @@
 			<param-value>[ WEB-INF/templates, classpath:org/apache/freemarker/servlet/jsp/templates ]</param-value>
 		</init-param>
         <init-param>
-            <param-name>incompatible_improvements</param-name>
+            <param-name>incompatibleImprovements</param-name>
             <param-value>3.0.0</param-value>
         </init-param>
 		<init-param>
-			<param-name>template_exception_handler</param-name>
-			<!-- Some may prefer "html_debug" for development. -->
+			<param-name>templateExceptionHandler</param-name>
+			<!-- Some may prefer "htmlDebug" for development. -->
 			<param-value>rethrow</param-value>
 		</init-param>
 		<init-param>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/tldDiscovery/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/tldDiscovery/WEB-INF/web.xml b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/tldDiscovery/WEB-INF/web.xml
index fe82825..bb64b8c 100644
--- a/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/tldDiscovery/WEB-INF/web.xml
+++ b/freemarker-servlet/src/test/resources/org/apache/freemarker/servlet/jsp/webapps/tldDiscovery/WEB-INF/web.xml
@@ -58,16 +58,16 @@
 
     <!-- FreeMarker settings: -->
     <init-param>
-      <param-name>incompatible_improvements</param-name>
+      <param-name>incompatibleImprovements</param-name>
       <param-value>3.0.0</param-value>
     </init-param>
     <init-param>
-      <param-name>template_exception_handler</param-name>
-      <!-- Some may prefer "html_debug" for development. -->
+      <param-name>templateExceptionHandler</param-name>
+      <!-- Some may prefer "htmlDebug" for development. -->
       <param-value>rethrow</param-value>
     </init-param>
     <init-param>
-      <param-name>template_update_delay</param-name>
+      <param-name>templateUpdateDelay</param-name>
       <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
     </init-param>
     <init-param>
@@ -79,7 +79,7 @@
       <param-value>en_US</param-value>
     </init-param>
     <init-param>
-      <param-name>number_format</param-name>
+      <param-name>numberFormat</param-name>
       <param-value>0.##########</param-value>
     </init-param>
 
@@ -112,16 +112,16 @@
 
     <!-- FreeMarker settings: -->
     <init-param>
-      <param-name>incompatible_improvements</param-name>
+      <param-name>incompatibleImprovements</param-name>
       <param-value>3.0.0</param-value>
     </init-param>
     <init-param>
-      <param-name>template_exception_handler</param-name>
-      <!-- Some may prefer "html_debug" for development. -->
+      <param-name>templateExceptionHandler</param-name>
+      <!-- Some may prefer "htmlDebug" for development. -->
       <param-value>rethrow</param-value>
     </init-param>
     <init-param>
-      <param-name>template_update_delay</param-name>
+      <param-name>templateUpdateDelay</param-name>
       <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
     </init-param>
     <init-param>
@@ -133,7 +133,7 @@
       <param-value>en_US</param-value>
     </init-param>
     <init-param>
-      <param-name>number_format</param-name>
+      <param-name>numberFormat</param-name>
       <param-value>0.##########</param-value>
     </init-param>
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-spring/src/test/java/org/apache/freemarker/spring/ConfigurationFactoryBeanTest.java
----------------------------------------------------------------------
diff --git a/freemarker-spring/src/test/java/org/apache/freemarker/spring/ConfigurationFactoryBeanTest.java b/freemarker-spring/src/test/java/org/apache/freemarker/spring/ConfigurationFactoryBeanTest.java
index 010664b..c071e8f 100644
--- a/freemarker-spring/src/test/java/org/apache/freemarker/spring/ConfigurationFactoryBeanTest.java
+++ b/freemarker-spring/src/test/java/org/apache/freemarker/spring/ConfigurationFactoryBeanTest.java
@@ -18,9 +18,7 @@
  */
 package org.apache.freemarker.spring;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.nio.charset.Charset;
 import java.util.HashMap;
@@ -31,7 +29,6 @@ import org.apache.freemarker.core.AutoEscapingPolicy;
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.Configuration.ExtendableBuilder;
 import org.apache.freemarker.core.MutableParsingAndProcessingConfiguration;
-import org.apache.freemarker.core.NamingConvention;
 import org.apache.freemarker.core.TagSyntax;
 import org.apache.freemarker.core.Template;
 import org.apache.freemarker.core.TemplateLanguage;
@@ -77,7 +74,6 @@ public class ConfigurationFactoryBeanTest {
         settings.setProperty(MutableParsingAndProcessingConfiguration.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY, "true");
         settings.setProperty(MutableParsingAndProcessingConfiguration.TEMPLATE_LANGUAGE_KEY, "FTL");
         settings.setProperty(MutableParsingAndProcessingConfiguration.TAG_SYNTAX_KEY, "squareBracket");
-        settings.setProperty(MutableParsingAndProcessingConfiguration.NAMING_CONVENTION_KEY, "camelCase");
         settings.setProperty(MutableParsingAndProcessingConfiguration.TAB_SIZE_KEY, "4");
 
         settings.setProperty(ExtendableBuilder.OBJECT_WRAPPER_KEY, "restricted");
@@ -100,10 +96,10 @@ public class ConfigurationFactoryBeanTest {
         //   <property name="incompatibleImprovements" value="3.0.0" />
         //   <property name="settings">
         //     <props>
-        //       <prop key="source_encoding">UTF-8</prop>
-        //       <prop key="whitespace_stripping">true</prop>
+        //       <prop key="sourceEncoding">UTF-8</prop>
+        //       <prop key="whitespaceStripping">true</prop>
         //       <!-- SNIP -->
-        //       <prop key="template_cache_storage">strong:20, soft:250</prop>
+        //       <prop key="templateCacheStorage">strong:20, soft:250</prop>
         //     </props>
         //   </property>
         //   <property name="sharedVariables">
@@ -154,7 +150,6 @@ public class ConfigurationFactoryBeanTest {
         assertTrue(config.isRecognizeStandardFileExtensionsSet());
         assertEquals(TemplateLanguage.FTL, config.getTemplateLanguage());
         assertEquals(TagSyntax.SQUARE_BRACKET, config.getTagSyntax());
-        assertEquals(NamingConvention.CAMEL_CASE, config.getNamingConvention());
         assertEquals(4, config.getTabSize());
 
         assertTrue(config.getObjectWrapper() instanceof RestrictedObjectWrapper);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestCase.java
----------------------------------------------------------------------
diff --git a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestCase.java b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestCase.java
index e7b9dad..9c6db39 100644
--- a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestCase.java
+++ b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestCase.java
@@ -96,7 +96,7 @@ class TemplateTestCase extends FileTestCase {
     }
     
     void setSetting(String param, String value) throws IOException {
-        if ("auto_import".equals(param)) {
+        if ("autoImports".equals(param)) {
             StringTokenizer st = new StringTokenizer(value);
             if (!st.hasMoreTokens()) fail("Expecting libname");
             String libname = st.nextToken();
@@ -106,7 +106,7 @@ class TemplateTestCase extends FileTestCase {
             if (!st.hasMoreTokens()) fail("Expecting alias after 'as' in autoimport");
             String alias = st.nextToken();
             confB.setAutoImports(ImmutableMap.of(alias, libname));
-        } else if ("source_encoding".equals(param)) {
+        } else if ("sourceEncoding".equals(param)) {
             confB.setSourceEncoding(Charset.forName(value));
         // INCOMPATIBLE_IMPROVEMENTS is a list here, and was already set in the constructor.
         } else if (!Configuration.ExtendableBuilder.INCOMPATIBLE_IMPROVEMENTS_KEY.equals(param)) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TestUtil.java
----------------------------------------------------------------------
diff --git a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TestUtil.java b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TestUtil.java
index c196e1b..13b03ec 100644
--- a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TestUtil.java
+++ b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TestUtil.java
@@ -189,7 +189,7 @@ public final class TestUtil {
     }
 
     public static String removeFTLCopyrightComment(String ftl) {
-        if (ftl.contains("<#ftl ns_prefixes = {\"D\" : \"http://example.com/eBook\"}>")) {
+        if (ftl.contains("<#ftl nsPrefixes = {\"D\" : \"http://example.com/eBook\"}>")) {
             System.out.println();
         }
 


[4/6] incubator-freemarker git commit: Removed namingConvention setting, and made directive names, built-in names, special variable names, and setting names, camel case. (Other naming conventions, if needed, are planned to be handled with custom dialects

Posted by dd...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
index 06e863c..1a24838 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
@@ -128,8 +128,8 @@ public class OptInTemplateClassResolverTest extends TestCase {
         {
             Configuration cfg = new TestConfigurationBuilder()
                     .setting(
-                            "new_builtin_class_resolver",
-                            "trusted_templates: foo.ftl, \"lib/*\"")
+                            "newBuiltinClassResolver",
+                            "trustedTemplates: foo.ftl, \"lib/*\"")
                     .build();
 
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
@@ -149,8 +149,8 @@ public class OptInTemplateClassResolverTest extends TestCase {
         {
             Configuration cfg = new TestConfigurationBuilder()
                     .setting(
-                            "new_builtin_class_resolver",
-                            "allowed_classes: java.lang.String, java.lang.Integer")
+                            "newBuiltinClassResolver",
+                            "allowedClasses: java.lang.String, java.lang.Integer")
                     .build();
 
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
@@ -170,8 +170,8 @@ public class OptInTemplateClassResolverTest extends TestCase {
         {
             Configuration cfg = new TestConfigurationBuilder()
                     .setting(
-                            "new_builtin_class_resolver",
-                            "trusted_templates: foo.ftl, 'lib/*', allowed_classes: 'java.lang.String',"
+                            "newBuiltinClassResolver",
+                            "trustedTemplates: foo.ftl, 'lib/*', allowedClasses: 'java.lang.String',"
                             + " java.lang.Integer")
                     .build();
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
@@ -200,7 +200,7 @@ public class OptInTemplateClassResolverTest extends TestCase {
         }
         
         try {
-            new TestConfigurationBuilder().setSetting("new_builtin_class_resolver", "wrong: foo");
+            new TestConfigurationBuilder().setSetting("newBuiltinClassResolver", "wrong: foo");
             fail();
         } catch (ConfigurationException e) {
             // Expected
@@ -209,8 +209,8 @@ public class OptInTemplateClassResolverTest extends TestCase {
         {
             Configuration cfg = new TestConfigurationBuilder()
                     .setting(
-                            "new_builtin_class_resolver",
-                            "\"allowed_classes\"  :  java.lang.String  ,  'trusted_templates' :\"lib:*\"")
+                            "newBuiltinClassResolver",
+                            "\"allowedClasses\"  :  java.lang.String  ,  'trustedTemplates' :\"lib:*\"")
                     .build();
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
             assertEquals(String.class, res.resolve("java.lang.String", null,

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
index 538a01f..2bda427 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
@@ -439,7 +439,7 @@ public class OutputFormatTest extends TemplateTest {
     
     @Test
     public void testStringBIsFail() {
-        assertErrorContains("<#ftl outputFormat='HTML'>${'<b>foo</b>'?esc?upperCase}", "string", "markup_output");
+        assertErrorContains("<#ftl outputFormat='HTML'>${'<b>foo</b>'?esc?upperCase}", "string", "markupOutput");
     }
 
     @Test
@@ -544,7 +544,7 @@ public class OutputFormatTest extends TemplateTest {
         addTemplate("tN.ftl", "<#ftl outputFormat='RTF' autoEsc=false>" + commonFTL);
         assertOutputForNamed("tN.ftl", "RTF false");
         
-        assertOutput("${.output_format} ${.auto_esc?c}", "undefined false");
+        assertOutput("${.outputFormat} ${.autoEsc?c}", "undefined false");
     }
     
     @Test
@@ -613,10 +613,10 @@ public class OutputFormatTest extends TemplateTest {
                 + "${.outputFormat}${'\\''}",
                 "undefined' HTML&#39; XML&apos; HTML&#39; undefined'");
         assertOutput(
-                "<#ftl output_format='XML'>"
-                + "${.output_format}${'\\''} "
-                + "<#outputformat 'HTML'>${.output_format}${'\\''}</#outputformat> "
-                + "${.output_format}${'\\''}",
+                "<#ftl outputFormat='XML'>"
+                + "${.outputFormat}${'\\''} "
+                + "<#outputFormat 'HTML'>${.outputFormat}${'\\''}</#outputFormat> "
+                + "${.outputFormat}${'\\''}",
                 "XML&apos; HTML&#39; XML&apos;");
         
         // Custom format:
@@ -644,28 +644,20 @@ public class OutputFormatTest extends TemplateTest {
                 "<#outputFormat true></#outputFormat>",
                 "string", "boolean");
         
-        // Naming convention:
-        assertErrorContains(
-                "<#outputFormat 'HTML'></#outputformat>",
-                "convention", "#outputFormat", "#outputformat");
-        assertErrorContains(
-                "<#outputformat 'HTML'></#outputFormat>",
-                "convention", "#outputFormat", "#outputformat");
-        
         // Empty block:
         assertOutput(
-                "${.output_format} "
-                + "<#outputformat 'HTML'></#outputformat>"
-                + "${.output_format}",
+                "${.outputFormat} "
+                + "<#outputFormat 'HTML'></#outputFormat>"
+                + "${.outputFormat}",
                 "undefined undefined");
         
         // WS stripping:
         assertOutput(
-                "${.output_format}\n"
-                + "<#outputformat 'HTML'>\n"
+                "${.outputFormat}\n"
+                + "<#outputFormat 'HTML'>\n"
                 + "  x\n"
-                + "</#outputformat>\n"
-                + "${.output_format}",
+                + "</#outputFormat>\n"
+                + "${.outputFormat}",
                 "undefined\n  x\nundefined");
     }
 
@@ -682,13 +674,13 @@ public class OutputFormatTest extends TemplateTest {
                 + "${.autoEsc?c}${'&'}",
                 "true&amp; false& true&amp; false& true&amp;");
         assertOutput(
-                "<#ftl auto_esc=false output_format='XML'>"
-                + "${.auto_esc?c}${'&'} "
-                + "<#autoesc>${.auto_esc?c}${'&'}</#autoesc> "
-                + "${.auto_esc?c}${'&'}",
+                "<#ftl autoEsc=false outputFormat='XML'>"
+                + "${.autoEsc?c}${'&'} "
+                + "<#autoEsc>${.autoEsc?c}${'&'}</#autoEsc> "
+                + "${.autoEsc?c}${'&'}",
                 "false& true&amp; false&");
         
-        // Bad came case:
+        // Bad camel case:
         assertErrorContains(
                 "<#noAutoesc></#noAutoesc>",
                 "Unknown directive");
@@ -702,34 +694,19 @@ public class OutputFormatTest extends TemplateTest {
         
         // Empty block:
         assertOutput(
-                "${.auto_esc?c} "
-                + "<#noautoesc></#noautoesc>"
-                + "${.auto_esc?c}",
+                "${.autoEsc?c} "
+                + "<#noAutoEsc></#noAutoEsc>"
+                + "${.autoEsc?c}",
                 "true true");
         
         // WS stripping:
         assertOutput(
-                "${.auto_esc?c}\n"
-                + "<#noautoesc>\n"
+                "${.autoEsc?c}\n"
+                + "<#noAutoEsc>\n"
                 + "  x\n"
-                + "</#noautoesc>\n"
-                + "${.auto_esc?c}",
+                + "</#noAutoEsc>\n"
+                + "${.autoEsc?c}",
                 "true\n  x\ntrue");
-        
-        
-        // Naming convention:
-        assertErrorContains(
-                "<#autoEsc></#autoesc>",
-                "convention", "#autoEsc", "#autoesc");
-        assertErrorContains(
-                "<#autoesc></#autoEsc>",
-                "convention", "#autoEsc", "#autoesc");
-        assertErrorContains(
-                "<#noAutoEsc></#noautoesc>",
-                "convention", "#noAutoEsc", "#noautoesc");
-        assertErrorContains(
-                "<#noautoesc></#noAutoEsc>",
-                "convention", "#noAutoEsc", "#noautoesc");
     }
     
     @Test
@@ -910,27 +887,27 @@ public class OutputFormatTest extends TemplateTest {
     @Test
     public void testLegacyEscaperBIsBypassMOs() throws Exception {
         assertOutput("${htmlPlain?html} ${htmlMarkup?html}", "a &lt; {h&#39;} <p>c");
-        assertErrorContains("${xmlPlain?html}", "?html", "string", "markup_output", "XML");
-        assertErrorContains("${xmlMarkup?html}", "?html", "string", "markup_output", "XML");
-        assertErrorContains("${rtfPlain?html}", "?html", "string", "markup_output", "RTF");
-        assertErrorContains("${rtfMarkup?html}", "?html", "string", "markup_output", "RTF");
+        assertErrorContains("${xmlPlain?html}", "?html", "string", "markupOutput", "XML");
+        assertErrorContains("${xmlMarkup?html}", "?html", "string", "markupOutput", "XML");
+        assertErrorContains("${rtfPlain?html}", "?html", "string", "markupOutput", "RTF");
+        assertErrorContains("${rtfMarkup?html}", "?html", "string", "markupOutput", "RTF");
 
         assertOutput("${htmlPlain?xhtml} ${htmlMarkup?xhtml}", "a &lt; {h&#39;} <p>c");
-        assertErrorContains("${xmlPlain?xhtml}", "?xhtml", "string", "markup_output", "XML");
-        assertErrorContains("${xmlMarkup?xhtml}", "?xhtml", "string", "markup_output", "XML");
-        assertErrorContains("${rtfPlain?xhtml}", "?xhtml", "string", "markup_output", "RTF");
-        assertErrorContains("${rtfMarkup?xhtml}", "?xhtml", "string", "markup_output", "RTF");
+        assertErrorContains("${xmlPlain?xhtml}", "?xhtml", "string", "markupOutput", "XML");
+        assertErrorContains("${xmlMarkup?xhtml}", "?xhtml", "string", "markupOutput", "XML");
+        assertErrorContains("${rtfPlain?xhtml}", "?xhtml", "string", "markupOutput", "RTF");
+        assertErrorContains("${rtfMarkup?xhtml}", "?xhtml", "string", "markupOutput", "RTF");
         
         assertOutput("${xmlPlain?xml} ${xmlMarkup?xml}", "a &lt; {x&apos;} <p>c</p>");
         assertOutput("${htmlPlain?xml} ${htmlMarkup?xml}", "a &lt; {h&#39;} <p>c");
-        assertErrorContains("${rtfPlain?xml}", "?xml", "string", "markup_output", "RTF");
-        assertErrorContains("${rtfMarkup?xml}", "?xml", "string", "markup_output", "RTF");
+        assertErrorContains("${rtfPlain?xml}", "?xml", "string", "markupOutput", "RTF");
+        assertErrorContains("${rtfMarkup?xml}", "?xml", "string", "markupOutput", "RTF");
         
         assertOutput("${rtfPlain?rtf} ${rtfMarkup?rtf}", "\\\\par a & b \\par c");
-        assertErrorContains("${xmlPlain?rtf}", "?rtf", "string", "markup_output", "XML");
-        assertErrorContains("${xmlMarkup?rtf}", "?rtf", "string", "markup_output", "XML");
-        assertErrorContains("${htmlPlain?rtf}", "?rtf", "string", "markup_output", "HTML");
-        assertErrorContains("${htmlMarkup?rtf}", "?rtf", "string", "markup_output", "HTML");
+        assertErrorContains("${xmlPlain?rtf}", "?rtf", "string", "markupOutput", "XML");
+        assertErrorContains("${xmlMarkup?rtf}", "?rtf", "string", "markupOutput", "XML");
+        assertErrorContains("${htmlPlain?rtf}", "?rtf", "string", "markupOutput", "HTML");
+        assertErrorContains("${htmlMarkup?rtf}", "?rtf", "string", "markupOutput", "HTML");
     }
     
     @Test
@@ -1010,7 +987,6 @@ public class OutputFormatTest extends TemplateTest {
         addToDataModel("m2", HTMLOutputFormat.INSTANCE.fromMarkup("x"));
         addToDataModel("s", "x");
         assertOutput("${m1?isMarkupOutput?c} ${m2?isMarkupOutput?c} ${s?isMarkupOutput?c}", "true true false");
-        assertOutput("${m1?is_markup_output?c}", "true");
     }
 
     private TestConfigurationBuilder createDefaultConfigurationBuilder() throws TemplateModelException {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/ParsingErrorMessagesTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ParsingErrorMessagesTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ParsingErrorMessagesTest.java
index 05d44dc..de746d5 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ParsingErrorMessagesTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ParsingErrorMessagesTest.java
@@ -116,8 +116,7 @@ public class ParsingErrorMessagesTest {
     @Test
     public void testUnknownHeaderParameter() {
         assertErrorContains("<#ftl foo=1>", "Unknown", "foo");
-        assertErrorContains("<#ftl attributes={}>", "Unknown", "attributes", "custom_settings");
-        assertErrorContains("<#ftl outputFormat='HTML' attributes={}>", "Unknown", "attributes", "customSettings");
+        assertErrorContains("<#ftl attributes={}>", "Unknown", "attributes", "customSettings");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/SQLTimeZoneTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/SQLTimeZoneTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/SQLTimeZoneTest.java
index 7aca106..5dbc2bb 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/SQLTimeZoneTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/SQLTimeZoneTest.java
@@ -94,7 +94,7 @@ public class SQLTimeZoneTest extends TemplateTest {
             + "${sqlTimestamp?string.xs_fz} ${javaDate?datetime?string.xs_fz}\n"
             + "${sqlDate?string.xs} ${sqlTime?string.xs} "
             + "${sqlTimestamp?string.xs} ${javaDate?datetime?string.xs}\n"
-            + "<#setting time_zone='GMT'>\n"
+            + "<#setting timeZone='GMT'>\n"
             + "${sqlDate} ${sqlTime} ${sqlTimestamp} ${javaDate?datetime}\n"
             + "${sqlDate?string.iso_fz} ${sqlTime?string.iso_fz} "
             + "${sqlTimestamp?string.iso_fz} ${javaDate?datetime?string.iso_fz}\n"
@@ -220,19 +220,19 @@ public class SQLTimeZoneTest extends TemplateTest {
                 + "2014-07-11 Fr, 10:30:05 Do, 2014-07-12T10:30:05 Sa, 2014-07-12T10:30:05 Sa, 2014-07-12 Sa, 10:30:05 Sa\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n"
-                + "<#setting date_format='yyyy-MM-dd'>\n"
+                + "<#setting dateFormat='yyyy-MM-dd'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n",
                 "2014-07-11 Fri, 10:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
                 + "2014-07-11, 10:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12, 10:30:05 Sat\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n"
-                + "<#setting time_format='HH:mm:ss'>\n"
+                + "<#setting timeFormat='HH:mm:ss'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n",
                 "2014-07-11 Fri, 10:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
                 + "2014-07-11 Fri, 10:30:05, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n"
-                + "<#setting datetime_format='yyyy-MM-dd\\'T\\'HH:mm:ss'>\n"
+                + "<#setting dateTimeFormat='yyyy-MM-dd\\'T\\'HH:mm:ss'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n",
                 "2014-07-11 Fri, 10:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
                 + "2014-07-11 Fri, 10:30:05 Thu, 2014-07-12T10:30:05, 2014-07-12T10:30:05, 2014-07-12 Sat, 10:30:05 Sat\n");
@@ -246,19 +246,19 @@ public class SQLTimeZoneTest extends TemplateTest {
                 + "2014-07-12 Sa, 12:30:05 Do, 2014-07-12T10:30:05 Sa, 2014-07-12T10:30:05 Sa, 2014-07-12 Sa, 10:30:05 Sa\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n"
-                + "<#setting date_format='yyyy-MM-dd'>\n"
+                + "<#setting dateFormat='yyyy-MM-dd'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n",
                 "2014-07-12 Sat, 12:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
                 + "2014-07-12, 12:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12, 10:30:05 Sat\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n"
-                + "<#setting time_format='HH:mm:ss'>\n"
+                + "<#setting timeFormat='HH:mm:ss'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n",
                 "2014-07-12 Sat, 12:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
                 + "2014-07-12 Sat, 12:30:05, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n"
-                + "<#setting datetime_format='yyyy-MM-dd\\'T\\'HH:mm:ss'>\n"
+                + "<#setting dateTimeFormat='yyyy-MM-dd\\'T\\'HH:mm:ss'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date}, ${javaDate?time}\n",
                 "2014-07-12 Sat, 12:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05 Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
                 + "2014-07-12 Sat, 12:30:05 Thu, 2014-07-12T10:30:05, 2014-07-12T10:30:05, 2014-07-12 Sat, 10:30:05 Sat\n");
@@ -283,10 +283,10 @@ public class SQLTimeZoneTest extends TemplateTest {
         assertOutput(
                 "${javaDayErrorDate?date} ${javaDayErrorDate?time} ${sqlTimestamp?date} ${sqlTimestamp?time} "
                 + "${sqlDate?date} ${sqlTime?time}\n"
-                + "<#setting time_zone='GMT+02'>\n"
+                + "<#setting timeZone='GMT+02'>\n"
                 + "${javaDayErrorDate?date} ${javaDayErrorDate?time} ${sqlTimestamp?date} ${sqlTimestamp?time} "
                 + "${sqlDate?date} ${sqlTime?time}\n"
-                + "<#setting time_zone='GMT-11'>\n"
+                + "<#setting timeZone='GMT-11'>\n"
                 + "${javaDayErrorDate?date} ${javaDayErrorDate?time} ${sqlTimestamp?date} ${sqlTimestamp?time} "
                 + "${sqlDate?date} ${sqlTime?time}\n",
                 "2014-07-11 22:00:00 2014-07-12 10:30:05 2014-07-12 12:30:05\n"
@@ -303,21 +303,21 @@ public class SQLTimeZoneTest extends TemplateTest {
 
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting sql_date_and_time_time_zone='GMT+02'>\n"
+                + "<#setting sqlDateAndTimeTimeZone='GMT+02'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting sql_date_and_time_time_zone='null'>\n"
+                + "<#setting sqlDateAndTimeTimeZone='null'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting time_zone='GMT+03'>\n"
+                + "<#setting timeZone='GMT+03'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting sql_date_and_time_time_zone='GMT+02'>\n"
+                + "<#setting sqlDateAndTimeTimeZone='GMT+02'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting sql_date_and_time_time_zone='GMT-11'>\n"
+                + "<#setting sqlDateAndTimeTimeZone='GMT-11'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting date_format='xs fz'>\n"
+                + "<#setting dateFormat='xs fz'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting time_format='xs fz'>\n"
+                + "<#setting timeFormat='xs fz'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n"
-                + "<#setting datetime_format='iso m'>\n"
+                + "<#setting dateTimeFormat='iso m'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}\n",
                 "2014-07-11, 10:30:05, 2014-07-12T10:30:05, 2014-07-12T10:30:05\n"
                 + "2014-07-12, 12:30:05, 2014-07-12T10:30:05, 2014-07-12T10:30:05\n"
@@ -338,17 +338,17 @@ public class SQLTimeZoneTest extends TemplateTest {
                 .build());
         
         assertOutput(
-                "<#setting date_format='xs fz'><#setting time_format='xs fz'>\n"
+                "<#setting dateFormat='xs fz'><#setting timeFormat='xs fz'>\n"
                 + "${sqlDate}, ${sqlTime}, ${javaDate?time}\n"
-                + "<#setting date_format='xs fz u'><#setting time_format='xs fz u'>\n"
+                + "<#setting dateFormat='xs fz u'><#setting timeFormat='xs fz u'>\n"
                 + "${sqlDate}, ${sqlTime}, ${javaDate?time}\n"
-                + "<#setting sql_date_and_time_time_zone='GMT+03'>\n"
+                + "<#setting sqlDateAndTimeTimeZone='GMT+03'>\n"
                 + "${sqlDate}, ${sqlTime}, ${javaDate?time}\n"
-                + "<#setting sql_date_and_time_time_zone='null'>\n"
+                + "<#setting sqlDateAndTimeTimeZone='null'>\n"
                 + "${sqlDate}, ${sqlTime}, ${javaDate?time}\n"
-                + "<#setting date_format='xs fz'><#setting time_format='xs fz'>\n"
+                + "<#setting dateFormat='xs fz'><#setting timeFormat='xs fz'>\n"
                 + "${sqlDate}, ${sqlTime}, ${javaDate?time}\n"
-                + "<#setting date_format='xs fz fu'><#setting time_format='xs fz fu'>\n"
+                + "<#setting dateFormat='xs fz fu'><#setting timeFormat='xs fz fu'>\n"
                 + "${sqlDate}, ${sqlTime}, ${javaDate?time}\n",
                 "2014-07-12+02:00, 12:30:05+02:00, 09:30:05-01:00\n"
                 + "2014-07-12+02:00, 12:30:05+02:00, 10:30:05Z\n"

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/SpecialVariableTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/SpecialVariableTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/SpecialVariableTest.java
index c74dfd7..664de58 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/SpecialVariableTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/SpecialVariableTest.java
@@ -33,7 +33,7 @@ public class SpecialVariableTest extends TemplateTest {
     @Test
     public void testNamesSorted() throws Exception {
         String prevName = null;
-        for (String name : ASTExpBuiltInVariable.SPEC_VAR_NAMES) {
+        for (String name : ASTExpBuiltInVariable.BUILT_IN_VARIABLE_NAMES) {
             if (prevName != null) {
                 assertThat(name, greaterThan(prevName));
             }
@@ -56,7 +56,7 @@ public class SpecialVariableTest extends TemplateTest {
         
         setConfiguration(new Configuration.Builder(Configuration.getVersion()).build());
         assertOutput(
-                "${.incompatible_improvements}",
+                "${.incompatibleImprovements}",
                 getConfiguration().getIncompatibleImprovements().toString());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/TagSyntaxVariationsTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/TagSyntaxVariationsTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/TagSyntaxVariationsTest.java
index 7b2473b..536be44 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/TagSyntaxVariationsTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/TagSyntaxVariationsTest.java
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
 
 /**
  * Test various generated templates (permutations), including some deliberately
- * wrong ones, with various tag_syntax settings.  
+ * wrong ones, with various tagSyntax settings.
  */
 public class TagSyntaxVariationsTest extends TestCase {
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateConfigurationTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateConfigurationTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateConfigurationTest.java
index 355c6e7..bd1405c 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateConfigurationTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateConfigurationTest.java
@@ -179,7 +179,6 @@ public class TemplateConfigurationTest {
         // Parser-only settings:
         SETTING_ASSIGNMENTS.put("templateLanguage", TemplateLanguage.STATIC_TEXT);
         SETTING_ASSIGNMENTS.put("tagSyntax", TagSyntax.SQUARE_BRACKET);
-        SETTING_ASSIGNMENTS.put("namingConvention", NamingConvention.LEGACY);
         SETTING_ASSIGNMENTS.put("whitespaceStripping", false);
         SETTING_ASSIGNMENTS.put("strictSyntaxMode", false);
         SETTING_ASSIGNMENTS.put("autoEscapingPolicy", AutoEscapingPolicy.DISABLE);
@@ -535,15 +534,7 @@ public class TemplateConfigurationTest {
             tcb.setTagSyntax(TagSyntax.SQUARE_BRACKET);
             TemplateConfiguration tc = tcb.build();
             assertOutputWithoutAndWithTC(tc, "[#if true]y[/#if]", "[#if true]y[/#if]", "y");
-            testedProps.add(Configuration.ExtendableBuilder.TAG_SYNTAX_KEY_CAMEL_CASE);
-        }
-        
-        {
-            TemplateConfiguration.Builder tcb = new TemplateConfiguration.Builder();
-            tcb.setNamingConvention(NamingConvention.CAMEL_CASE);
-            TemplateConfiguration tc = tcb.build();
-            assertOutputWithoutAndWithTC(tc, "<#if true>y<#elseif false>n</#if>", "y", null);
-            testedProps.add(Configuration.ExtendableBuilder.NAMING_CONVENTION_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.TAG_SYNTAX_KEY);
         }
         
         {
@@ -551,7 +542,7 @@ public class TemplateConfigurationTest {
             tcb.setWhitespaceStripping(false);
             TemplateConfiguration tc = tcb.build();
             assertOutputWithoutAndWithTC(tc, "<#if true>\nx\n</#if>\n", "x\n", "\nx\n\n");
-            testedProps.add(Configuration.ExtendableBuilder.WHITESPACE_STRIPPING_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.WHITESPACE_STRIPPING_KEY);
         }
 
         {
@@ -559,7 +550,7 @@ public class TemplateConfigurationTest {
             tcb.setArithmeticEngine(new DummyArithmeticEngine());
             TemplateConfiguration tc = tcb.build();
             assertOutputWithoutAndWithTC(tc, "${1} ${1+1}", "1 2", "11 22");
-            testedProps.add(Configuration.ExtendableBuilder.ARITHMETIC_ENGINE_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.ARITHMETIC_ENGINE_KEY);
         }
 
         {
@@ -569,7 +560,7 @@ public class TemplateConfigurationTest {
             assertOutputWithoutAndWithTC(tc, "${.outputFormat} ${\"a'b\"}",
                     UndefinedOutputFormat.INSTANCE.getName() + " a'b",
                     XMLOutputFormat.INSTANCE.getName() + " a&apos;b");
-            testedProps.add(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY);
         }
 
         {
@@ -578,7 +569,7 @@ public class TemplateConfigurationTest {
             tcb.setAutoEscapingPolicy(AutoEscapingPolicy.DISABLE);
             TemplateConfiguration tc = tcb.build();
             assertOutputWithoutAndWithTC(tc, "${'a&b'}", "a&b", "a&b");
-            testedProps.add(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY);
         }
         
         {
@@ -588,7 +579,7 @@ public class TemplateConfigurationTest {
             tc.setParentConfiguration(new Configuration(new Version(2, 3, 0)));
             assertOutputWithoutAndWithTC(tc, "<#foo>", null, "<#foo>");
             */
-            testedProps.add(Configuration.ExtendableBuilder.INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.INCOMPATIBLE_IMPROVEMENTS_KEY);
         }
 
         {
@@ -597,7 +588,7 @@ public class TemplateConfigurationTest {
             TemplateConfiguration tc = tcb.build();
             assertOutputWithoutAndWithTC(tc, "adhoc.ftlh", "${.outputFormat}",
                     HTMLOutputFormat.INSTANCE.getName(), UndefinedOutputFormat.INSTANCE.getName());
-            testedProps.add(Configuration.ExtendableBuilder.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY);
         }
 
         {
@@ -609,7 +600,7 @@ public class TemplateConfigurationTest {
                     + "${.error?replace('(?s).*?column ([0-9]+).*', '$1', 'r')}"
                     + "</#attempt>",
                     "13", "8");
-            testedProps.add(Configuration.ExtendableBuilder.TAB_SIZE_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.TAB_SIZE_KEY);
         }
 
         {
@@ -641,7 +632,7 @@ public class TemplateConfigurationTest {
                 assertEquals("${1+1}", out.toString());
             }
 
-            testedProps.add(Configuration.ExtendableBuilder.TEMPLATE_LANGUAGE_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.TEMPLATE_LANGUAGE_KEY);
         }
 
         {
@@ -674,7 +665,7 @@ public class TemplateConfigurationTest {
                 assertEquals("próba", out.toString());
             }
 
-            testedProps.add(Configuration.ExtendableBuilder.SOURCE_ENCODING_KEY_CAMEL_CASE);
+            testedProps.add(Configuration.ExtendableBuilder.SOURCE_ENCODING_KEY);
         }
 
         if (!PARSER_PROP_NAMES.equals(testedProps)) {
@@ -764,39 +755,13 @@ public class TemplateConfigurationTest {
         
         {
             Charset outputEncoding = ISO_8859_2;
+            TemplateConfiguration tc = new TemplateConfiguration.Builder()
+                    .outputEncoding(outputEncoding)
+                    .build();
 
-            String legacyNCFtl = "${r'.output_encoding!\"null\"'?eval}";
-            String camelCaseNCFtl = "${r'.outputEncoding!\"null\"'?eval}";
-
-            {
-                TemplateConfiguration tc = new TemplateConfiguration.Builder()
-                        .outputEncoding(outputEncoding)
-                        .build();
-
-                // Default is re-auto-detecting in ?eval:
-                assertOutputWithoutAndWithTC(tc, legacyNCFtl, "null", outputEncoding.name());
-                assertOutputWithoutAndWithTC(tc, camelCaseNCFtl, "null", outputEncoding.name());
-            }
-
-            {
-                TemplateConfiguration tc = new TemplateConfiguration.Builder()
-                        .outputEncoding(outputEncoding)
-                        .namingConvention(NamingConvention.CAMEL_CASE) // Force camelCase
-                        .build();
-
-                assertOutputWithoutAndWithTC(tc, legacyNCFtl, "null", null);
-                assertOutputWithoutAndWithTC(tc, camelCaseNCFtl, "null", outputEncoding.name());
-            }
-
-            {
-                TemplateConfiguration tc = new TemplateConfiguration.Builder()
-                        .outputEncoding(outputEncoding)
-                        .namingConvention(NamingConvention.LEGACY) // Force legacy
-                        .build();
-
-                assertOutputWithoutAndWithTC(tc, legacyNCFtl, "null", outputEncoding.name());
-                assertOutputWithoutAndWithTC(tc, camelCaseNCFtl, "null", null);
-            }
+            // Default is re-auto-detecting in ?eval:
+            assertOutputWithoutAndWithTC(tc, "${r'.outputEncoding!\"null\"'?eval}",
+                    "null", outputEncoding.name());
         }
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/UnclosedCommentTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/UnclosedCommentTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/UnclosedCommentTest.java
index 99bf5d3..a45ffff 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/UnclosedCommentTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/UnclosedCommentTest.java
@@ -32,10 +32,10 @@ public class UnclosedCommentTest extends TemplateTest {
         assertErrorContains("foo<#-- ", "Unclosed", "<#--");
         assertErrorContains("foo<#--bar", "Unclosed", "<#--");
         assertErrorContains("foo\n<#--\n", "Unclosed", "<#--");
-        assertErrorContains("foo<#noparse>", "end of file");  // Not too good...
-        assertErrorContains("foo<#noparse> ", "Unclosed", "#noparse");
-        assertErrorContains("foo<#noparse>bar", "Unclosed", "#noparse");
-        assertErrorContains("foo\n<#noparse>\n", "Unclosed", "#noparse");
+        assertErrorContains("foo<#noParse>", "end of file");  // Not too good...
+        assertErrorContains("foo<#noParse> ", "Unclosed", "#noParse");
+        assertErrorContains("foo<#noParse>bar", "Unclosed", "#noParse");
+        assertErrorContains("foo\n<#noParse>\n", "Unclosed", "#noParse");
     }
     
 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/model/impl/ErrorMessagesTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/model/impl/ErrorMessagesTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/model/impl/ErrorMessagesTest.java
index 4306a50..29e8b9b 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/model/impl/ErrorMessagesTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/model/impl/ErrorMessagesTest.java
@@ -66,8 +66,8 @@ public class ErrorMessagesTest {
                 fail();
             } catch (TemplateModelException e) {
                 assertThat(e.getMessage(), allOf(
-                        containsString("String"), containsString("convert"), containsString("markup_output"),
-                        containsString("Tip:"), containsString("?markup_string")));
+                        containsString("String"), containsString("convert"), containsString("markupOutput"),
+                        containsString("Tip:"), containsString("?markupString")));
             }
         }
         
@@ -78,8 +78,8 @@ public class ErrorMessagesTest {
                 fail();
             } catch (TemplateModelException e) {
                 assertThat(e.getMessage(), allOf(
-                        containsString("Date"), containsString("convert"), containsString("markup_output"),
-                        not(containsString("?markup_string"))));
+                        containsString("Date"), containsString("convert"), containsString("markupOutput"),
+                        not(containsString("?markupString"))));
             }
         }
         
@@ -91,8 +91,8 @@ public class ErrorMessagesTest {
             } catch (TemplateModelException e) {
                 assertThat(e.getMessage(), allOf(
                         containsString("No compatible overloaded"),
-                        containsString("String"), containsString("markup_output"),
-                        containsString("Tip:"), containsString("?markup_string")));
+                        containsString("String"), containsString("markupOutput"),
+                        containsString("Tip:"), containsString("?markupString")));
             }
         }
         
@@ -104,8 +104,8 @@ public class ErrorMessagesTest {
             } catch (TemplateModelException e) {
                 assertThat(e.getMessage(), allOf(
                         containsString("No compatible overloaded"),
-                        containsString("Integer"), containsString("markup_output"),
-                        not(containsString("?markup_string"))));
+                        containsString("Integer"), containsString("markupOutput"),
+                        not(containsString("?markupString"))));
             }
         }
         

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-1.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-1.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-1.ast
index 9021a8c..90b4956 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-1.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-1.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     #text  // o.a.f.c.ASTStaticText
         - content: "1 "  // String
     @  // o.a.f.c.ASTDirUserDefined
@@ -63,7 +63,7 @@
         - namespace: null  // Null
     #text  // o.a.f.c.ASTStaticText
         - content: "\n4 "  // String
-    #if-#elseif-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer
+    #if-#elseIf-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer
         #if  // o.a.f.c.ASTDirIfOrElseOrElseIf
             - condition: ==  // o.a.f.c.ASTExpComparison
                 - left-hand operand: +  // o.a.f.c.ASTExpAddOrConcat
@@ -175,12 +175,12 @@
         - content: " A comment "  // String
     #text  // o.a.f.c.ASTStaticText
         - content: "\n11 "  // String
-    #outputformat  // o.a.f.c.ASTDirOutputFormat
+    #outputFormat  // o.a.f.c.ASTDirOutputFormat
         - value: "XML"  // o.a.f.c.ASTExpStringLiteral
-        #noautoesc  // o.a.f.c.ASTDirNoAutoEsc
+        #noAutoEsc  // o.a.f.c.ASTDirNoAutoEsc
             ${...}  // o.a.f.c.ASTDollarInterpolation
                 - content: a  // o.a.f.c.ASTExpVariable
-            #autoesc  // o.a.f.c.ASTDirAutoEsc
+            #autoEsc  // o.a.f.c.ASTDirAutoEsc
                 ${...}  // o.a.f.c.ASTDollarInterpolation
                     - content: b  // o.a.f.c.ASTExpVariable
             ${...}  // o.a.f.c.ASTDollarInterpolation

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-assignments.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-assignments.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-assignments.ast
index 4839892..479f868 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-assignments.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-assignments.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     #text  // o.a.f.c.ASTStaticText
         - content: "1 "  // String
     #assign  // o.a.f.c.ASTDirAssignment

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-builtins.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-builtins.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-builtins.ast
index 02f1a3b..538dd05 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-builtins.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-builtins.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     ${...}  // o.a.f.c.ASTDollarInterpolation
         - content: ?trim  // o.a.f.c.BuiltInsForStringsBasic$trimBI
             - left-hand operand: x  // o.a.f.c.ASTExpVariable

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-locations.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-locations.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-locations.ast
index 7770d72..2466cfd 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-locations.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-locations.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent; Location 1:1-18:8
+#mixedContent  // o.a.f.c.ASTImplicitParent; Location 1:1-18:8
     #if  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 1:1-1:15
         - condition: exp  // o.a.f.c.ASTExpVariable; Location 1:6-1:8
         - AST-node subtype: "0"  // Integer
@@ -36,14 +36,14 @@
             - content: "2"  // String
     #text  // o.a.f.c.ASTStaticText; Location 3:21-3:21
         - content: "\n"  // String
-    #if-#elseif-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 4:1-4:22
+    #if-#elseIf-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 4:1-4:22
         #if  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 4:1-4:9
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 4:6-4:8
             - AST-node subtype: "0"  // Integer
         #else  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 4:10-4:16
             - condition: null  // Null
             - AST-node subtype: "1"  // Integer
-    #if-#elseif-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 5:1-5:24
+    #if-#elseIf-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 5:1-5:24
         #if  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 5:1-5:10
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 5:6-5:8
             - AST-node subtype: "0"  // Integer
@@ -56,7 +56,7 @@
                 - content: "1"  // String
     #text  // o.a.f.c.ASTStaticText; Location 5:25-5:25
         - content: "\n"  // String
-    #if-#elseif-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 6:1-6:32
+    #if-#elseIf-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 6:1-6:32
         #if  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 6:1-6:14
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 6:6-6:8
             - AST-node subtype: "0"  // Integer
@@ -73,18 +73,18 @@
                 - content: "2"  // String
     #text  // o.a.f.c.ASTStaticText; Location 6:33-6:33
         - content: "\n"  // String
-    #if-#elseif-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 7:1-7:28
+    #if-#elseIf-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 7:1-7:28
         #if  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 7:1-7:9
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 7:6-7:8
             - AST-node subtype: "0"  // Integer
-        #elseif  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 7:10-7:22
+        #elseIf  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 7:10-7:22
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 7:19-7:21
             - AST-node subtype: "2"  // Integer
-    #if-#elseif-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 8:1-8:29
+    #if-#elseIf-#else-container  // o.a.f.c.ASTDirIfElseIfElseContainer; Location 8:1-8:29
         #if  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 8:1-8:9
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 8:6-8:8
             - AST-node subtype: "0"  // Integer
-        #elseif  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 8:10-8:23
+        #elseIf  // o.a.f.c.ASTDirIfOrElseOrElseIf; Location 8:10-8:23
             - condition: exp  // o.a.f.c.ASTExpVariable; Location 8:19-8:21
             - AST-node subtype: "2"  // Integer
             #text  // o.a.f.c.ASTStaticText; Location 8:23-8:23

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-multipleignoredchildren.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-multipleignoredchildren.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-multipleignoredchildren.ast
index 7675522..90fd2c6 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-multipleignoredchildren.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-multipleignoredchildren.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     #text  // o.a.f.c.ASTStaticText
         - content: "a\n"  // String
     #text  // o.a.f.c.ASTStaticText

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ast
index eefa5b1..e2d278a 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ast
@@ -16,5 +16,5 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#outputformat  // o.a.f.c.ASTDirOutputFormat
+#outputFormat  // o.a.f.c.ASTDirOutputFormat
     - value: "HTML"  // o.a.f.c.ASTExpStringLiteral

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ast
index 6fb5ab7..474b298 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     #assign  // o.a.f.c.ASTDirAssignment
         - assignment target: "x"  // String
         - assignment operator: "="  // String

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ast
index 97aca52..da4cf66 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     #text  // o.a.f.c.ASTStaticText
         - content: "1. "  // String
     @  // o.a.f.c.ASTDirUserDefined

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ast
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ast b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ast
index 868fc69..41e3b12 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ast
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ast
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#mixed_content  // o.a.f.c.ASTImplicitParent
+#mixedContent  // o.a.f.c.ASTImplicitParent
     #assign  // o.a.f.c.ASTDirAssignment
         - assignment target: "xs"  // String
         - assignment operator: "="  // String

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/noparse.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/noparse.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/noparse.txt
index 5e8486c..d91e5d5 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/noparse.txt
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/noparse.txt
@@ -37,15 +37,15 @@ ${message@#$%&}
 		</#if>
 	</p>
 
-Here's another edge case, this time, trying to output a &lt;noparse&gt;
-inside another &lt;noparse&gt;
+Here's another edge case, this time, trying to output a &lt;noParse&gt;
+inside another &lt;noParse&gt;
 
 
-This is what the noparse instruction looks like:
+This is what the noParse instruction looks like:
 
-<#noparse>This part of the template wont be parsed by the 
+<#noParse>This part of the template wont be parsed by the
 FreeMarker parser. Instead, it will be treated as verbatim text information,
-and output as such.</#noparse>
+and output as such.</#noParse>
 
 The rest of the template appears here.
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/string-builtins1.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/string-builtins1.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/string-builtins1.txt
index 6e689ac..d79e7dc 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/string-builtins1.txt
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/string-builtins1.txt
@@ -19,20 +19,20 @@
 FreeMarker: Encoding string built-in tests
 
   
-cap_first:    DieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upper_case}  
-uncap_first:  dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upper_case}  
-uncap_first:blah
-capitalize:   Diebugsdie! * Vazzze 123456 --cdc-- --<<--@ X ${"kigyo"?upper_case}  
-html:         dieBugsDie! * vazzZE 123456 --cdc-- --&lt;&lt;--@ x ${&quot;kigyo&quot;?upper_case}  
-length:     71
-lower_case:   diebugsdie! * vazzze 123456 --cdc-- --<<--@ x ${"kigyo"?upper_case}  
-rtf:          dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x $\{"kigyo"?upper_case\}  
-trim:       dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upper_case}
+capFirst:     DieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upperCase}  ;
+uncapFirst:   dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upperCase}  ;
+uncapFirst: blah
+capitalize:   Diebugsdie! * Vazzze 123456 --cdc-- --<<--@ X ${"kigyo"?uppercase}  ;
+html:         dieBugsDie! * vazzZE 123456 --cdc-- --&lt;&lt;--@ x ${&quot;kigyo&quot;?upperCase}  ;
+length:     70;
+lowerCase:    diebugsdie! * vazzze 123456 --cdc-- --<<--@ x ${"kigyo"?uppercase}  ;
+rtf:          dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x $\{"kigyo"?upperCase\}  ;
+trim:       dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upperCase};
 trim2:      foo bar
 trim3:      foo bar
 trim4:      foo bar
-upper_case:   DIEBUGSDIE! * VAZZZE 123456 --CDC-- --<<--@ X ${"KIGYO"?UPPER_CASE}  
-xml:          dieBugsDie! * vazzZE 123456 --cdc-- --&lt;&lt;--@ x ${&quot;kigyo&quot;?upper_case}  
+upperCase:    DIEBUGSDIE! * VAZZZE 123456 --CDC-- --<<--@ X ${"KIGYO"?UPPERCASE}  ;
+xml:          dieBugsDie! * vazzZE 123456 --cdc-- --&lt;&lt;--@ x ${&quot;kigyo&quot;?upperCase}  ;
 xhtml:      &quot;Blah&#39;s is &gt; 1 &amp; &lt; 2&quot;
 
 word_list:
@@ -43,7 +43,7 @@ word_list:
 - --cdc--
 - --<<--@
 - x
-- ${"kigyo"?upper_case}
+- ${"kigyo"?upperCase}
 
 interpret:   dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x KIGYO  
 number: -122,35

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/comment.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/comment.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/comment.ftl
index 9c47168..c5cb54b 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/comment.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/comment.ftl
@@ -41,7 +41,7 @@ ${message@#$%&}
 </#if>
 
 a <#-- < --> b
-a <#-- </#noparse> - -- --> b
+a <#-- </#noParse> - -- --> b
 
 ${1 + 2 + [#-- c --] <#-- c --> <!-- c --> 3}
 ${<!-- > -> -- #> #] --> 7}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-iso-like.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-iso-like.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-iso-like.ftl
index be4d31b..e4dd980 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-iso-like.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-iso-like.ftl
@@ -104,19 +104,19 @@
 <@assertEquals actual=d?string.iso expected="0000-05-13" />
 
 <#assign dt = "2010-05-15T01:02:03"?datetime.xs>
-<#setting datetimeFormat="xs">
+<#setting dateTimeFormat="xs">
 <@assertEquals actual=dt?string expected="2010-05-15T01:02:03-05:00" />
-<#setting datetimeFormat="xs u">
+<#setting dateTimeFormat="xs u">
 <@assertEquals actual=dt?string expected="2010-05-15T06:02:03Z" />
-<#setting datetimeFormat="iso u">
+<#setting dateTimeFormat="iso u">
 <@assertEquals actual=dt?string expected="2010-05-15T06:02:03Z" />
-<#setting datetimeFormat="xs fz">
+<#setting dateTimeFormat="xs fz">
 <@assertEquals actual=dt?string expected="2010-05-15T01:02:03-05:00" />
-<#setting datetimeFormat="xs fz u">
+<#setting dateTimeFormat="xs fz u">
 <@assertEquals actual=dt?string expected="2010-05-15T06:02:03Z" />
-<#setting datetimeFormat="xs nz u">
+<#setting dateTimeFormat="xs nz u">
 <@assertEquals actual=dt?string expected="2010-05-15T06:02:03" />
-<#setting datetimeFormat="iso m nz">
+<#setting dateTimeFormat="iso m nz">
 <@assertEquals actual=dt?string expected="2010-05-15T01:02" />
 
 <#assign d = dt?date>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-java.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-java.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-java.ftl
index 5d64c68..219f0a4 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-java.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateformat-java.ftl
@@ -18,7 +18,7 @@
 -->
 <#setting locale="en_US">
 <#setting timeZone="GMT">
-<#setting datetimeFormat="">
+<#setting dateTimeFormat="">
 ${date}
 ${unknownDate?datetime}
 ${date?string}
@@ -46,26 +46,26 @@ ${date?time?string.short}
 ${date?time?string.medium}
 ${date?time?string.long}
 <#setting locale="hu_hu">
-<#setting datetimeFormat="long_long">
+<#setting dateTimeFormat="long_long">
 ${date}
 <#setting locale="en_US">
-<#setting datetimeFormat="EEE, dd MMM yyyyy HH:mm:ss z">
+<#setting dateTimeFormat="EEE, dd MMM yyyyy HH:mm:ss z">
 ${date}
 ${unknownDate?string["EEE, dd MMM yyyy HH:mm:ss z"]}
 ${unknownDate?string("EEE, dd MMM yyyy HH:mm:ss z")}
 ${unknownDate?string.yyyy}
 
-<#setting datetimeFormat="yyyy">
+<#setting dateTimeFormat="yyyy">
 <#assign s = date?string>
 ${s}
-<#setting datetimeFormat="MM">
+<#setting dateTimeFormat="MM">
 ${s}
 
 <#-- Check ?string lazy evaluation bug was fixed: -->
-<#setting datetimeFormat="yyyy">
+<#setting dateTimeFormat="yyyy">
 <#assign s = date?string>
 <#-- no ${s} -->
-<#setting datetimeFormat="MM">
+<#setting dateTimeFormat="MM">
 ${s}
 <#assign s = date?string>
 ${s}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
index c5155f0..63716cb 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
@@ -18,7 +18,7 @@
 -->
 <#setting locale="en_US">
 <#setting timeZone="GMT">
-<#setting datetimeFormat="G yyyy-MM-dd HH:mm:ss.S Z">
+<#setting dateTimeFormat="G yyyy-MM-dd HH:mm:ss.S Z">
 <#setting dateFormat="G yyyy-MM-dd Z">
 <#setting timeFormat="HH:mm:ss.S Z">
 
@@ -52,7 +52,7 @@
 <#list ['xs', 'xs_nz', 'xs_fz', 'xs s', 'xs ms'] as format>
   <#setting dateFormat=format>
   <#setting timeFormat=format>
-  <#setting datetimeFormat=format>
+  <#setting dateTimeFormat=format>
   <@assertEquals expected=refDate actual="1998-10-30Z"?date />
   <@assertEquals expected=refTime actual="15:30:44.512Z"?time />
   <@assertEquals expected=refDateTime actual="1998-10-30T15:30:44.512Z"?datetime />
@@ -60,7 +60,7 @@
 <#list ['iso', 'iso_nz', 'iso_fz', 'iso m'] as format>
   <#setting dateFormat=format>
   <#setting timeFormat=format>
-  <#setting datetimeFormat=format>
+  <#setting dateTimeFormat=format>
   <@assertEquals expected=refDate actual="1998-10-30"?date />
   <@assertEquals expected=refDate actual="19981030"?date />
   <@assertEquals expected=refTime actual="15:30:44,512Z"?time />

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
index ca84253..47a8c71 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
@@ -103,7 +103,7 @@
 </#list></#list>
 
 <#-- parsing errors -->
-<@assertFails message="valid #if-#elseif-#else"><@"<#if t><#else><#elseif t2></#if>"?interpret /></@>
-<@assertFails message="valid #if-#elseif-#else"><@"<#if t><#else><#else></#if>"?interpret /></@>
-<@assertFails message="valid #if-#elseif-#else"><@"<#else></#else>"?interpret /></@>
-<@assertFails message="valid #if-#elseif-#else"><@"<#elseif t></#elseif>"?interpret /></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#if t><#else><#elseIf t2></#if>"?interpret /></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#if t><#else><#else></#if>"?interpret /></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#else></#else>"?interpret /></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#elseIf t></#elseIf>"?interpret /></@>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/noparse.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/noparse.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/noparse.ftl
index cbf4dc1..cc85c9c 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/noparse.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/noparse.ftl
@@ -43,16 +43,16 @@ ${message@#$%&}
 	</p>
 </#if>
 
-Here's another edge case, this time, trying to output a &lt;noparse&gt;
-inside another &lt;noparse&gt;
+Here's another edge case, this time, trying to output a &lt;noParse&gt;
+inside another &lt;noParse&gt;
 
 <#noParse>
 
-This is what the noparse instruction looks like:
+This is what the noParse instruction looks like:
 
-<#nop</#noParse><#noParse>arse>This part of the template wont be parsed by the 
+<#noP</#noParse><#noParse>arse>This part of the template wont be parsed by the
 FreeMarker parser. Instead, it will be treated as verbatim text information,
-and output as such.</#nop</#noParse><#noParse>arse>
+and output as such.</#noP</#noParse><#noParse>arse>
 
 The rest of the template appears here.
 </#noParse>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl
index 1b58b59..de60a84 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl
@@ -33,7 +33,7 @@
 <#setting timeFormat="'tf'">
 <@assertEquals expected='tf' actual=.now?time?string />
 
-<#setting datetimeFormat="'dtf'">
+<#setting dateTimeFormat="'dtf'">
 <@assertEquals expected='dtf' actual=.now?string />
 
 <#setting timeZone='GMT+00'>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl
index 6e8255a..be1b19e 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl
@@ -18,22 +18,22 @@
 -->
 FreeMarker: Encoding string built-in tests
 
-<#assign x = r'  dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upper_case}  '>
+<#assign x = r'  dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upperCase}  '>
   
-cap_first:  ${x?capFirst}
-uncap_first:${x?uncapFirst}
-uncap_first:${"Blah"?uncapFirst}
-capitalize: ${x?capitalize}
-html:       ${x?html}
-length:     ${x?length}
-lower_case: ${x?lowerCase}
-rtf:        ${x?rtf}
-trim:       ${x?trim}
+capFirst:   ${x?capFirst};
+uncapFirst: ${x?uncapFirst};
+uncapFirst: ${"Blah"?uncapFirst}
+capitalize: ${x?capitalize};
+html:       ${x?html};
+length:     ${x?length};
+lowerCase:  ${x?lowerCase};
+rtf:        ${x?rtf};
+trim:       ${x?trim};
 trim2:      ${"foo bar"?trim}
 trim3:      ${" foo bar"?trim}
 trim4:      ${"foo bar "?trim}
-upper_case: ${x?upperCase}
-xml:        ${x?xml}
+upperCase:  ${x?upperCase};
+xml:        ${x?xml};
 xhtml:      ${"\"Blah's is > 1 & < 2\""?xhtml}
 <@assertEquals actual="'"?html expected="&#39;" />
 <@assertEquals actual="'"?xhtml expected="&#39;" />
@@ -105,7 +105,7 @@ ${matches?groups[2]}
 </#list>
 
 
-<#assign a = "foo", b="bar", c="(a+b)?upper_case">
+<#assign a = "foo", b="bar", c="(a+b)?upperCase">
 ${c?eval}
 
 [${"a"?jString}] = [a]

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
index 55ed29d..a02ad3c 100644
--- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
@@ -33,29 +33,29 @@
      
  <!ELEMENT setting EMPTY>
      <!ATTLIST setting 
-            auto_import CDATA #IMPLIED
-            source_encoding CDATA #IMPLIED
+            autoImports CDATA #IMPLIED
+            sourceEncoding CDATA #IMPLIED
             locale CDATA #IMPLIED
-            object_wrapper CDATA #IMPLIED
-            output_encoding CDATA #IMPLIED
+            objectWrapper CDATA #IMPLIED
+            outputEncoding CDATA #IMPLIED
             output_dir CDATA #IMPLIED
-            new_builtin_class_resolver CDATA #IMPLIED
-            url_escaping_charset CDATA #IMPLIED
-            incompatible_improvements CDATA #IMPLIED
-            time_zone CDATA #IMPLIED
-            api_builtin_enabled CDATA #IMPLIED
+            newBuiltinClassResolver CDATA #IMPLIED
+            urlEscapingCharset CDATA #IMPLIED
+            incompatibleImprovements CDATA #IMPLIED
+            timeZone CDATA #IMPLIED
+            apiBuiltinEnabled CDATA #IMPLIED
       >
 ]>
 <!--
-Note that for the incompatible_improvements setting you can specify a list of versions, for example:
-<setting incompatible_improvements="min, 3.0.5, max" /> 
+Note that for the incompatibleImprovements setting you can specify a list of versions, for example:
+<setting incompatibleImprovements="min, 3.0.5, max" />
 -->
 
 <testCases>
-   <setting source_encoding="UTF-8" output_encoding="UTF-8" />
+   <setting sourceEncoding="UTF-8" outputEncoding="UTF-8" />
    
    <testCase name="api-builtins" noOutput="true">
-      <setting api_builtin_enabled="true" />
+      <setting apiBuiltinEnabled="true" />
    </testCase>
    <testCase name="assignments" noOutput="true" />
    <testCase name="boolean" />
@@ -70,7 +70,7 @@ Note that for the incompatible_improvements setting you can specify a list of ve
    <testCase name="dateparsing" noOutput="true" />
    <testCase name="default"/>
    <testCase name="default-object-wrapper">
-      <setting api_builtin_enabled="true" />
+      <setting apiBuiltinEnabled="true" />
    </testCase>
    <testCase name="encoding-builtins" />
    <testCase name="escapes" />
@@ -78,36 +78,36 @@ Note that for the incompatible_improvements setting you can specify a list of ve
    <testCase name="identifier-non-ascii" />
    <testCase name="identifier-escaping" />
    <testCase name="import">
-      <setting auto_import="import_lib.ftl as my"/>
+      <setting autoImports="import_lib.ftl as my"/>
    </testCase>
    <testCase name="include" />
    <testCase name="include2">
-      <setting source_encoding="utf-8" />
+      <setting sourceEncoding="utf-8" />
    </testCase>
    <testCase name="interpret"/>
    <testCase name="iterators"/>
    <testCase name="lastcharacter"/>
    <testCase name="list[#endTN]-simpleTemplateModels" expected="list.txt">
-      <setting object_wrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
+      <setting objectWrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="list[#endTN]-collectionAdapter" expected="list.txt">
-      <setting object_wrapper="DefaultObjectWrapper(3.0.0)" />
+      <setting objectWrapper="DefaultObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="list2[#endTN]-simpleTemplateModels" expected="list2.txt">
-      <setting object_wrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
+      <setting objectWrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="list2[#endTN]-collectionAdapter" expected="list2.txt">
-      <setting object_wrapper="DefaultObjectWrapper(3.0.0)" />
+      <setting objectWrapper="DefaultObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="list3[#endTN]-simpleTemplateModels" expected="list3.txt">
-      <setting object_wrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
+      <setting objectWrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="list3[#endTN]-collectionAdapter" expected="list3.txt">
-      <setting object_wrapper="DefaultObjectWrapper(3.0.0)" />
+      <setting objectWrapper="DefaultObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="list-bis" />
    <testCase name="list-bis[#endTN]-collectionAdapter" expected="list-bis.txt">
-      <setting object_wrapper="DefaultObjectWrapper(3.0.0)" />
+      <setting objectWrapper="DefaultObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="listhash" />
    <testCase name="listhashliteral" />
@@ -131,10 +131,10 @@ Note that for the incompatible_improvements setting you can specify a list of ve
    <testCase name="numerical-cast" />
    <testCase name="output-encoding1"/>
    <testCase name="output-encoding2">
-       <setting output_encoding="UTF-16"/>
+       <setting outputEncoding="UTF-16"/>
    </testCase>
    <testCase name="output-encoding3">
-       <setting output_encoding="ISO-8859-1" url_escaping_charset="UTF-16" />
+       <setting outputEncoding="ISO-8859-1" urlEscapingCharset="UTF-16" />
    </testCase>
    <testCase name="precedence"/>
    <testCase name="range" noOutput="true" />
@@ -142,13 +142,13 @@ Note that for the incompatible_improvements setting you can specify a list of ve
    <testCase name="root" />
    <testCase name="setting" noOutput="true" />
    <testCase name="sequence-builtins[#endTN]-with-SimpleTemplateModel" expected="sequence-builtins.txt">
-      <setting object_wrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
+      <setting objectWrapper="org.apache.freemarker.core.templatesuite.models.SimpleMapAndCollectionObjectWrapper(3.0.0)" />
    </testCase>
    <testCase name="sequence-builtins[#endTN]-with-DefaultObjectWrapper" expected="sequence-builtins.txt">
-      <setting object_wrapper="default"/> 
+      <setting objectWrapper="default"/>
    </testCase>
    <testCase name="sequence-builtins[#endTN]-with-DefaultObjectWrapper-collAdapters" expected="sequence-builtins.txt">
-      <setting object_wrapper="DefaultObjectWrapper(3.0.0)"/>
+      <setting objectWrapper="DefaultObjectWrapper(3.0.0)"/>
    </testCase>
    <testCase name="simplehash-char-key" noOutput="true" />
    <testCase name="existence-operators" noOutput="true" />
@@ -173,19 +173,19 @@ Note that for the incompatible_improvements setting you can specify a list of ve
    <testCase name="hashconcat"/>
    <testCase name="new-defaultresolver" />
    <testCase name="new-unrestricted" template="new-defaultresolver.ftl" expected="new-defaultresolver.txt">
-      <setting new_builtin_class_resolver="unrestricted"/>
+      <setting newBuiltinClassResolver="unrestricted"/>
    </testCase>   
    <testCase name="new-allowsnothing" template="new-defaultresolver.ftl">
-      <setting new_builtin_class_resolver="allow_nothing"/>
+      <setting newBuiltinClassResolver="allowNothing"/>
    </testCase>   
    <testCase name="new-optin">
-      <setting new_builtin_class_resolver="
-      		allowed_classes: org.apache.freemarker.core.templatesuite.models.NewTestModel,
-      		trusted_templates: subdir/new-optin.ftl, subdir/subsub/*"
+      <setting newBuiltinClassResolver="
+      		allowedClasses: org.apache.freemarker.core.templatesuite.models.NewTestModel,
+      		trustedTemplates: subdir/new-optin.ftl, subdir/subsub/*"
       />
    </testCase>   
    <testCase name="specialvars">
-      <setting locale="en_US" output_encoding="utf-8" url_escaping_charset="iso-8859-1"/>
+      <setting locale="en_US" outputEncoding="utf-8" urlEscapingCharset="iso-8859-1"/>
    </testCase>   
    <testCase name="number-to-date" />
    <testCase name="varargs" />
@@ -194,9 +194,9 @@ Note that for the incompatible_improvements setting you can specify a list of ve
    <testCase name="string-builtin-coercion" noOutput="true" />
    
    <testCase name="overloaded-methods[#endTN]-inc-dow" noOutput="true">
-      <setting object_wrapper="org.apache.freemarker.core.model.impl.DefaultObjectWrapperInc"/>
+      <setting objectWrapper="org.apache.freemarker.core.model.impl.DefaultObjectWrapperInc"/>
    </testCase>
    <testCase name="overloaded-methods[#endTN]-desc-dow" noOutput="true">
-      <setting object_wrapper="org.apache.freemarker.core.model.impl.DefaultObjectWrapperDesc"/>
+      <setting objectWrapper="org.apache.freemarker.core.model.impl.DefaultObjectWrapperDesc"/>
    </testCase>
 </testCases>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDebugBreak.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDebugBreak.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDebugBreak.java
index 577daff..562a2cb 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDebugBreak.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDebugBreak.java
@@ -63,7 +63,7 @@ class ASTDebugBreak extends ASTElement {
     
     @Override
     String getASTNodeDescriptor() {
-        return "#debug_break";
+        return "#debugBreak";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirAutoEsc.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirAutoEsc.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirAutoEsc.java
index 0f44975..b982e56 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirAutoEsc.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirAutoEsc.java
@@ -46,7 +46,7 @@ final class ASTDirAutoEsc extends ASTDirective {
     
     @Override
     String getASTNodeDescriptor() {
-        return "#autoesc";
+        return "#autoEsc";
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirCapturingAssignment.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirCapturingAssignment.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirCapturingAssignment.java
index 4624b65..28edbf2 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirCapturingAssignment.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirCapturingAssignment.java
@@ -142,7 +142,7 @@ final class ASTDirCapturingAssignment extends ASTDirective {
             sb.append(getASTNodeDescriptor());
             sb.append('>');
         } else {
-            sb.append(" = .nested_output");
+            sb.append(" = .nestedOutput");
         }
         return sb.toString();
     }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfElseIfElseContainer.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfElseIfElseContainer.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfElseIfElseContainer.java
index b24bca8..8a250bf 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfElseIfElseContainer.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfElseIfElseContainer.java
@@ -22,7 +22,7 @@ package org.apache.freemarker.core;
 import java.io.IOException;
 
 /**
- * AST directive node: Container for a group of related {@code #if}, {@code #elseif} and {@code #else} directives.
+ * AST directive node: Container for a group of related {@code #if}, {@code #elseIf} and {@code #else} directives.
  * Each such block is a nested {@link ASTDirIfOrElseOrElseIf}. Note that if an {@code #if} stands alone,
  * {@link ASTDirIfOrElseOrElseIf} doesn't need this parent element.
  */
@@ -81,7 +81,7 @@ final class ASTDirIfElseIfElseContainer extends ASTDirective {
     
     @Override
     String getASTNodeDescriptor() {
-        return "#if-#elseif-#else-container";
+        return "#if-#elseIf-#else-container";
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfOrElseOrElseIf.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfOrElseOrElseIf.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfOrElseOrElseIf.java
index 5dd0ba0..28178d9 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfOrElseOrElseIf.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirIfOrElseOrElseIf.java
@@ -24,8 +24,8 @@ import java.io.IOException;
 import org.apache.freemarker.core.util.BugException;
 
 /**
- * AST directive node: An element that represents a conditionally executed block: {@code #if}, {@code #elseif} or
- * {@code #elseif}. Note that when an {@code #if} has related {@code #elseif}-s or {@code #else}, an
+ * AST directive node: An element that represents a conditionally executed block: {@code #if}, {@code #elseIf} or
+ * {@code #elseIf}. Note that when an {@code #if} has related {@code #elseIf}-s or {@code #else}, an
  * {@link ASTDirIfElseIfElseContainer} parent must be used. For a lonely {@code #if}, no such parent is needed. 
  */
 final class ASTDirIfOrElseOrElseIf extends ASTDirective {
@@ -77,7 +77,7 @@ final class ASTDirIfOrElseOrElseIf extends ASTDirective {
         } else if (type == TYPE_IF) {
             return "#if";
         } else if (type == TYPE_ELSE_IF) {
-            return "#elseif";
+            return "#elseIf";
         } else {
             throw new BugException("Unknown type");
         }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoAutoEsc.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoAutoEsc.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoAutoEsc.java
index 73812bb..a3ef03d 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoAutoEsc.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoAutoEsc.java
@@ -22,7 +22,7 @@ package org.apache.freemarker.core;
 import java.io.IOException;
 
 /**
- * AST directive node: {@code #noautoesc}.
+ * AST directive node: {@code #noAutoEsc}.
  */
 final class ASTDirNoAutoEsc extends ASTDirective {
     
@@ -46,7 +46,7 @@ final class ASTDirNoAutoEsc extends ASTDirective {
     
     @Override
     String getASTNodeDescriptor() {
-        return "#noautoesc";
+        return "#noAutoEsc";
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoEscape.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoEscape.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoEscape.java
index e7decca..61a32b8 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoEscape.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirNoEscape.java
@@ -22,7 +22,7 @@ package org.apache.freemarker.core;
 import java.io.IOException;
 
 /**
- * AST directive node: {@code #noescape}.
+ * AST directive node: {@code #noEscape}.
  */
 class ASTDirNoEscape extends ASTDirective {
 
@@ -62,7 +62,7 @@ class ASTDirNoEscape extends ASTDirective {
     
     @Override
     String getASTNodeDescriptor() {
-        return "#noescape";
+        return "#noEscape";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirOutputFormat.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirOutputFormat.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirOutputFormat.java
index 3cd7090..c2aa7b8 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirOutputFormat.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirOutputFormat.java
@@ -22,7 +22,7 @@ package org.apache.freemarker.core;
 import java.io.IOException;
 
 /**
- * AST directive node: {@code #outputformat}.
+ * AST directive node: {@code #outputFormat}.
  */
 final class ASTDirOutputFormat extends ASTDirective {
     
@@ -50,7 +50,7 @@ final class ASTDirOutputFormat extends ASTDirective {
     
     @Override
     String getASTNodeDescriptor() {
-        return "#outputformat";
+        return "#outputFormat";
     }
     
     @Override


[3/6] incubator-freemarker git commit: Removed namingConvention setting, and made directive names, built-in names, special variable names, and setting names, camel case. (Other naming conventions, if needed, are planned to be handled with custom dialects

Posted by dd...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirSetting.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirSetting.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirSetting.java
index fe2c4f8..0a8a160 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirSetting.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirSetting.java
@@ -37,25 +37,16 @@ final class ASTDirSetting extends ASTDirective {
     
     static final String[] SETTING_NAMES = new String[] {
             // Must be sorted alphabetically!
-            MutableProcessingConfiguration.BOOLEAN_FORMAT_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.BOOLEAN_FORMAT_KEY_SNAKE_CASE,
-            MutableProcessingConfiguration.DATE_FORMAT_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.DATE_FORMAT_KEY_SNAKE_CASE,
-            MutableProcessingConfiguration.DATETIME_FORMAT_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.DATETIME_FORMAT_KEY_SNAKE_CASE,
+            MutableProcessingConfiguration.BOOLEAN_FORMAT_KEY,
+            MutableProcessingConfiguration.DATE_FORMAT_KEY,
+            MutableProcessingConfiguration.DATE_TIME_FORMAT_KEY,
             MutableProcessingConfiguration.LOCALE_KEY,
-            MutableProcessingConfiguration.NUMBER_FORMAT_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.NUMBER_FORMAT_KEY_SNAKE_CASE,
-            MutableProcessingConfiguration.OUTPUT_ENCODING_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.OUTPUT_ENCODING_KEY_SNAKE_CASE,
-            MutableProcessingConfiguration.SQL_DATE_AND_TIME_TIME_ZONE_KEY_CAMEL_CASE,
+            MutableProcessingConfiguration.NUMBER_FORMAT_KEY,
+            MutableProcessingConfiguration.OUTPUT_ENCODING_KEY,
             MutableProcessingConfiguration.SQL_DATE_AND_TIME_TIME_ZONE_KEY,
-            MutableProcessingConfiguration.TIME_FORMAT_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.TIME_ZONE_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.TIME_FORMAT_KEY_SNAKE_CASE,
-            MutableProcessingConfiguration.TIME_ZONE_KEY_SNAKE_CASE,
-            MutableProcessingConfiguration.URL_ESCAPING_CHARSET_KEY_CAMEL_CASE,
-            MutableProcessingConfiguration.URL_ESCAPING_CHARSET_KEY_SNAKE_CASE
+            MutableProcessingConfiguration.TIME_FORMAT_KEY,
+            MutableProcessingConfiguration.TIME_ZONE_KEY,
+            MutableProcessingConfiguration.URL_ESCAPING_CHARSET_KEY,
     };
 
     ASTDirSetting(Token keyTk, FMParserTokenManager tokenManager, ASTExpression value, Configuration cfg)
@@ -63,8 +54,7 @@ final class ASTDirSetting extends ASTDirective {
         String key = keyTk.image;
         if (Arrays.binarySearch(SETTING_NAMES, key) < 0) {
             StringBuilder sb = new StringBuilder();
-            if (Configuration.ExtendableBuilder.getSettingNames(true).contains(key)
-                    || Configuration.ExtendableBuilder.getSettingNames(false).contains(key)) {
+            if (Configuration.ExtendableBuilder.getSettingNames().contains(key)) {
                 sb.append("The setting name is recognized, but changing this setting from inside a template isn't "
                         + "supported.");                
             } else {
@@ -72,27 +62,15 @@ final class ASTDirSetting extends ASTDirective {
                 sb.append(_StringUtil.jQuote(key)).append(".");
                 sb.append(" The allowed setting names are: ");
 
-                NamingConvention shownNamingConvention;
-                {
-                    NamingConvention namingConvention = tokenManager.namingConvention;
-                    shownNamingConvention = namingConvention != NamingConvention.AUTO_DETECT
-                            ? namingConvention : NamingConvention.LEGACY /* [2.4] CAMEL_CASE */;
-                }
-                
                 boolean first = true;
                 for (String correctName : SETTING_NAMES) {
-                    NamingConvention correctNameNamingConvention = _StringUtil.getIdentifierNamingConvention(correctName);
-                    if (shownNamingConvention == NamingConvention.CAMEL_CASE
-                            ? correctNameNamingConvention != NamingConvention.LEGACY
-                            : correctNameNamingConvention != NamingConvention.CAMEL_CASE) {
-                        if (first) {
-                            first = false;
-                        } else {
-                            sb.append(", ");
-                        }
-
-                        sb.append(correctName);
+                    if (first) {
+                        first = false;
+                    } else {
+                        sb.append(", ");
                     }
+
+                    sb.append(correctName);
                 }
             }
             throw new ParseException(sb.toString(), null, keyTk);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirective.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirective.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirective.java
index 778fed1..e20c0e3 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirective.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTDirective.java
@@ -27,72 +27,52 @@ import java.util.TreeSet;
  */
 abstract class ASTDirective extends ASTElement {
 
-    private static void addName(Set<String> allNames, Set<String> lcNames, Set<String> ccNames,
-                                String commonName) {
-        allNames.add(commonName);
-        lcNames.add(commonName);
-        ccNames.add(commonName);
-    }
-
-    private static void addName(Set<String> allNames, Set<String> lcNames, Set<String> ccNames,
-                                String lcName, String ccName) {
-        allNames.add(lcName);
-        allNames.add(ccName);
-        lcNames.add(lcName);
-        ccNames.add(ccName);
-    }
-
-    static final Set<String> ALL_BUILT_IN_DIRECTIVE_NAMES;
-    static final Set<String> LEGACY_BUILT_IN_DIRECTIVE_NAMES;
-    static final Set<String> CAMEL_CASE_BUILT_IN_DIRECTIVE_NAMES;
+    static final Set<String> BUILT_IN_DIRECTIVE_NAMES;
     static {
-        Set<String> allNames = new TreeSet();
-        Set<String> lcNames = new TreeSet();
-        Set<String> ccNames = new TreeSet();
+        TreeSet<String> names = new TreeSet<>();
+        
+        names.add("assign");
+        names.add("attempt");
+        names.add("autoEsc");
+        names.add("break");
+        names.add("case");
+        names.add("compress");
+        names.add("default");
+        names.add("else");
+        names.add("elseIf");
+        names.add("escape");
+        names.add("fallback");
+        names.add("flush");
+        names.add("ftl");
+        names.add("function");
+        names.add("global");
+        names.add("if");
+        names.add("import");
+        names.add("include");
+        names.add("items");
+        names.add("list");
+        names.add("local");
+        names.add("lt");
+        names.add("macro");
+        names.add("nested");
+        names.add("noAutoEsc");
+        names.add("noEscape");
+        names.add("noParse");
+        names.add("nt");
+        names.add("outputFormat");
+        names.add("recover");
+        names.add("recurse");
+        names.add("return");
+        names.add("rt");
+        names.add("sep");
+        names.add("setting");
+        names.add("stop");
+        names.add("switch");
+        names.add("t");
+        names.add("visit");
 
-        addName(allNames, lcNames, ccNames, "assign");
-        addName(allNames, lcNames, ccNames, "attempt");
-        addName(allNames, lcNames, ccNames, "autoesc", "autoEsc");
-        addName(allNames, lcNames, ccNames, "break");
-        addName(allNames, lcNames, ccNames, "case");
-        addName(allNames, lcNames, ccNames, "compress");
-        addName(allNames, lcNames, ccNames, "default");
-        addName(allNames, lcNames, ccNames, "else");
-        addName(allNames, lcNames, ccNames, "elseif", "elseIf");
-        addName(allNames, lcNames, ccNames, "escape");
-        addName(allNames, lcNames, ccNames, "fallback");
-        addName(allNames, lcNames, ccNames, "flush");
-        addName(allNames, lcNames, ccNames, "ftl");
-        addName(allNames, lcNames, ccNames, "function");
-        addName(allNames, lcNames, ccNames, "global");
-        addName(allNames, lcNames, ccNames, "if");
-        addName(allNames, lcNames, ccNames, "import");
-        addName(allNames, lcNames, ccNames, "include");
-        addName(allNames, lcNames, ccNames, "items");
-        addName(allNames, lcNames, ccNames, "list");
-        addName(allNames, lcNames, ccNames, "local");
-        addName(allNames, lcNames, ccNames, "lt");
-        addName(allNames, lcNames, ccNames, "macro");
-        addName(allNames, lcNames, ccNames, "nested");
-        addName(allNames, lcNames, ccNames, "noautoesc", "noAutoEsc");
-        addName(allNames, lcNames, ccNames, "noescape", "noEscape");
-        addName(allNames, lcNames, ccNames, "noparse", "noParse");
-        addName(allNames, lcNames, ccNames, "nt");
-        addName(allNames, lcNames, ccNames, "outputformat", "outputFormat");
-        addName(allNames, lcNames, ccNames, "recover");
-        addName(allNames, lcNames, ccNames, "recurse");
-        addName(allNames, lcNames, ccNames, "return");
-        addName(allNames, lcNames, ccNames, "rt");
-        addName(allNames, lcNames, ccNames, "sep");
-        addName(allNames, lcNames, ccNames, "setting");
-        addName(allNames, lcNames, ccNames, "stop");
-        addName(allNames, lcNames, ccNames, "switch");
-        addName(allNames, lcNames, ccNames, "t");
-        addName(allNames, lcNames, ccNames, "visit");
+        BUILT_IN_DIRECTIVE_NAMES = Collections.unmodifiableSet(names);
 
-        ALL_BUILT_IN_DIRECTIVE_NAMES = Collections.unmodifiableSet(allNames);
-        LEGACY_BUILT_IN_DIRECTIVE_NAMES = Collections.unmodifiableSet(lcNames);
-        CAMEL_CASE_BUILT_IN_DIRECTIVE_NAMES = Collections.unmodifiableSet(ccNames);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltIn.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltIn.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltIn.java
index b246ad4..3f0454f 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltIn.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltIn.java
@@ -23,8 +23,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
 
 import org.apache.freemarker.core.BuiltInsForDates.iso_BI;
 import org.apache.freemarker.core.BuiltInsForDates.iso_utc_or_local_BI;
@@ -79,8 +77,6 @@ abstract class ASTExpBuiltIn extends ASTExpression implements Cloneable {
     protected ASTExpression target;
     protected String key;
 
-    static final Set<String> CAMEL_CASE_NAMES = new TreeSet<>();
-    static final Set<String> SNAKE_CASE_NAMES = new TreeSet<>();
     static final int NUMBER_OF_BIS = 263;
     static final HashMap<String, ASTExpBuiltIn> BUILT_INS_BY_NAME = new HashMap(NUMBER_OF_BIS * 3 / 2 + 1, 1f);
 
@@ -93,21 +89,21 @@ abstract class ASTExpBuiltIn extends ASTExpression implements Cloneable {
         putBI("boolean", new BuiltInsForStringsMisc.booleanBI());
         putBI("byte", new byteBI());
         putBI("c", new BuiltInsForMultipleTypes.cBI());
-        putBI("cap_first", "capFirst", new BuiltInsForStringsBasic.cap_firstBI());
+        putBI("capFirst", new BuiltInsForStringsBasic.cap_firstBI());
         putBI("capitalize", new BuiltInsForStringsBasic.capitalizeBI());
         putBI("ceiling", new ceilingBI());
         putBI("children", new childrenBI());
-        putBI("chop_linebreak", "chopLinebreak", new BuiltInsForStringsBasic.chop_linebreakBI());
+        putBI("chopLinebreak", new BuiltInsForStringsBasic.chop_linebreakBI());
         putBI("contains", new BuiltInsForStringsBasic.containsBI());        
         putBI("date", new BuiltInsForMultipleTypes.dateBI(TemplateDateModel.DATE));
-        putBI("date_if_unknown", "dateIfUnknown", new BuiltInsForDates.dateType_if_unknownBI(TemplateDateModel.DATE));
+        putBI("dateIfUnknown", new BuiltInsForDates.dateType_if_unknownBI(TemplateDateModel.DATE));
         putBI("datetime", new BuiltInsForMultipleTypes.dateBI(TemplateDateModel.DATETIME));
-        putBI("datetime_if_unknown", "datetimeIfUnknown", new BuiltInsForDates.dateType_if_unknownBI(TemplateDateModel.DATETIME));
+        putBI("datetimeIfUnknown", new BuiltInsForDates.dateType_if_unknownBI(TemplateDateModel.DATETIME));
         putBI("default", new BuiltInsForExistenceHandling.defaultBI());
         putBI("double", new doubleBI());
-        putBI("ends_with", "endsWith", new BuiltInsForStringsBasic.ends_withBI());
-        putBI("ensure_ends_with", "ensureEndsWith", new BuiltInsForStringsBasic.ensure_ends_withBI());
-        putBI("ensure_starts_with", "ensureStartsWith", new BuiltInsForStringsBasic.ensure_starts_withBI());
+        putBI("endsWith", new BuiltInsForStringsBasic.ends_withBI());
+        putBI("ensureEndsWith", new BuiltInsForStringsBasic.ensure_ends_withBI());
+        putBI("ensureStartsWith", new BuiltInsForStringsBasic.ensure_starts_withBI());
         putBI("esc", new escBI());
         putBI("eval", new evalBI());
         putBI("exists", new BuiltInsForExistenceHandling.existsBI());
@@ -116,171 +112,171 @@ abstract class ASTExpBuiltIn extends ASTExpression implements Cloneable {
         putBI("floor", new floorBI());
         putBI("chunk", new chunkBI());
         putBI("counter", new BuiltInsForLoopVariables.counterBI());
-        putBI("item_cycle", "itemCycle", new BuiltInsForLoopVariables.item_cycleBI());
-        putBI("has_api", "hasApi", new BuiltInsForMultipleTypes.has_apiBI());
-        putBI("has_content", "hasContent", new BuiltInsForExistenceHandling.has_contentBI());
-        putBI("has_next", "hasNext", new BuiltInsForLoopVariables.has_nextBI());
+        putBI("itemCycle", new BuiltInsForLoopVariables.item_cycleBI());
+        putBI("hasApi", new BuiltInsForMultipleTypes.has_apiBI());
+        putBI("hasContent", new BuiltInsForExistenceHandling.has_contentBI());
+        putBI("hasNext", new BuiltInsForLoopVariables.has_nextBI());
         putBI("html", new BuiltInsForStringsEncoding.htmlBI());
-        putBI("if_exists", "ifExists", new BuiltInsForExistenceHandling.if_existsBI());
+        putBI("ifExists", new BuiltInsForExistenceHandling.if_existsBI());
         putBI("index", new BuiltInsForLoopVariables.indexBI());
-        putBI("index_of", "indexOf", new BuiltInsForStringsBasic.index_ofBI(false));
+        putBI("indexOf", new BuiltInsForStringsBasic.index_ofBI(false));
         putBI("int", new intBI());
         putBI("interpret", new BuiltInsForStringsMisc.interpretBI());
-        putBI("is_boolean", "isBoolean", new BuiltInsForMultipleTypes.is_booleanBI());
-        putBI("is_collection", "isCollection", new BuiltInsForMultipleTypes.is_collectionBI());
-        putBI("is_collection_ex", "isCollectionEx", new BuiltInsForMultipleTypes.is_collection_exBI());
+        putBI("isBoolean", new BuiltInsForMultipleTypes.is_booleanBI());
+        putBI("isCollection", new BuiltInsForMultipleTypes.is_collectionBI());
+        putBI("isCollectionEx", new BuiltInsForMultipleTypes.is_collection_exBI());
         is_dateLikeBI bi = new BuiltInsForMultipleTypes.is_dateLikeBI();
-        putBI("is_date", "isDate", bi);  // misnomer
-        putBI("is_date_like", "isDateLike", bi);
-        putBI("is_date_only", "isDateOnly", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.DATE));
-        putBI("is_even_item", "isEvenItem", new BuiltInsForLoopVariables.is_even_itemBI());
-        putBI("is_first", "isFirst", new BuiltInsForLoopVariables.is_firstBI());
-        putBI("is_last", "isLast", new BuiltInsForLoopVariables.is_lastBI());
-        putBI("is_unknown_date_like", "isUnknownDateLike", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.UNKNOWN));
-        putBI("is_datetime", "isDatetime", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.DATETIME));
-        putBI("is_directive", "isDirective", new BuiltInsForMultipleTypes.is_directiveBI());
-        putBI("is_enumerable", "isEnumerable", new BuiltInsForMultipleTypes.is_enumerableBI());
-        putBI("is_hash_ex", "isHashEx", new BuiltInsForMultipleTypes.is_hash_exBI());
-        putBI("is_hash", "isHash", new BuiltInsForMultipleTypes.is_hashBI());
-        putBI("is_infinite", "isInfinite", new is_infiniteBI());
-        putBI("is_indexable", "isIndexable", new BuiltInsForMultipleTypes.is_indexableBI());
-        putBI("is_macro", "isMacro", new BuiltInsForMultipleTypes.is_macroBI());
-        putBI("is_markup_output", "isMarkupOutput", new BuiltInsForMultipleTypes.is_markup_outputBI());
-        putBI("is_method", "isMethod", new BuiltInsForMultipleTypes.is_methodBI());
-        putBI("is_nan", "isNan", new is_nanBI());
-        putBI("is_node", "isNode", new BuiltInsForMultipleTypes.is_nodeBI());
-        putBI("is_number", "isNumber", new BuiltInsForMultipleTypes.is_numberBI());
-        putBI("is_odd_item", "isOddItem", new BuiltInsForLoopVariables.is_odd_itemBI());
-        putBI("is_sequence", "isSequence", new BuiltInsForMultipleTypes.is_sequenceBI());
-        putBI("is_string", "isString", new BuiltInsForMultipleTypes.is_stringBI());
-        putBI("is_time", "isTime", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.TIME));
-        putBI("is_transform", "isTransform", new BuiltInsForMultipleTypes.is_transformBI());
+        putBI("isDate", bi);  // misnomer
+        putBI("isDateLike", bi);
+        putBI("isDateOnly", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.DATE));
+        putBI("isEvenItem", new BuiltInsForLoopVariables.is_even_itemBI());
+        putBI("isFirst", new BuiltInsForLoopVariables.is_firstBI());
+        putBI("isLast", new BuiltInsForLoopVariables.is_lastBI());
+        putBI("isUnknownDateLike", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.UNKNOWN));
+        putBI("isDatetime", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.DATETIME));
+        putBI("isDirective", new BuiltInsForMultipleTypes.is_directiveBI());
+        putBI("isEnumerable", new BuiltInsForMultipleTypes.is_enumerableBI());
+        putBI("isHashEx", new BuiltInsForMultipleTypes.is_hash_exBI());
+        putBI("isHash", new BuiltInsForMultipleTypes.is_hashBI());
+        putBI("isInfinite", new is_infiniteBI());
+        putBI("isIndexable", new BuiltInsForMultipleTypes.is_indexableBI());
+        putBI("isMacro", new BuiltInsForMultipleTypes.is_macroBI());
+        putBI("isMarkupOutput", new BuiltInsForMultipleTypes.is_markup_outputBI());
+        putBI("isMethod", new BuiltInsForMultipleTypes.is_methodBI());
+        putBI("isNan", new is_nanBI());
+        putBI("isNode", new BuiltInsForMultipleTypes.is_nodeBI());
+        putBI("isNumber", new BuiltInsForMultipleTypes.is_numberBI());
+        putBI("isOddItem", new BuiltInsForLoopVariables.is_odd_itemBI());
+        putBI("isSequence", new BuiltInsForMultipleTypes.is_sequenceBI());
+        putBI("isString", new BuiltInsForMultipleTypes.is_stringBI());
+        putBI("isTime", new BuiltInsForMultipleTypes.is_dateOfTypeBI(TemplateDateModel.TIME));
+        putBI("isTransform", new BuiltInsForMultipleTypes.is_transformBI());
         
-        putBI("iso_utc", "isoUtc", new iso_utc_or_local_BI(
+        putBI("isoUtc", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_SECONDS, /* useUTC = */ true));
-        putBI("iso_utc_fz", "isoUtcFZ", new iso_utc_or_local_BI(
+        putBI("isoUtcFZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.TRUE, _DateUtil.ACCURACY_SECONDS, /* useUTC = */ true));
-        putBI("iso_utc_nz", "isoUtcNZ", new iso_utc_or_local_BI(
+        putBI("isoUtcNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_SECONDS, /* useUTC = */ true));
         
-        putBI("iso_utc_ms", "isoUtcMs", new iso_utc_or_local_BI(
+        putBI("isoUtcMs", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_MILLISECONDS, /* useUTC = */ true));
-        putBI("iso_utc_ms_nz", "isoUtcMsNZ", new iso_utc_or_local_BI(
+        putBI("isoUtcMsNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_MILLISECONDS, /* useUTC = */ true));
         
-        putBI("iso_utc_m", "isoUtcM", new iso_utc_or_local_BI(
+        putBI("isoUtcM", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_MINUTES, /* useUTC = */ true));
-        putBI("iso_utc_m_nz", "isoUtcMNZ", new iso_utc_or_local_BI(
+        putBI("isoUtcMNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_MINUTES, /* useUTC = */ true));
         
-        putBI("iso_utc_h", "isoUtcH", new iso_utc_or_local_BI(
+        putBI("isoUtcH", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_HOURS, /* useUTC = */ true));
-        putBI("iso_utc_h_nz", "isoUtcHNZ", new iso_utc_or_local_BI(
+        putBI("isoUtcHNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_HOURS, /* useUTC = */ true));
         
-        putBI("iso_local", "isoLocal", new iso_utc_or_local_BI(
+        putBI("isoLocal", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_SECONDS, /* useUTC = */ false));
-        putBI("iso_local_nz", "isoLocalNZ", new iso_utc_or_local_BI(
+        putBI("isoLocalNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_SECONDS, /* useUTC = */ false));
         
-        putBI("iso_local_ms", "isoLocalMs", new iso_utc_or_local_BI(
+        putBI("isoLocalMs", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_MILLISECONDS, /* useUTC = */ false));
-        putBI("iso_local_ms_nz", "isoLocalMsNZ", new iso_utc_or_local_BI(
+        putBI("isoLocalMsNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_MILLISECONDS, /* useUTC = */ false));
         
-        putBI("iso_local_m", "isoLocalM", new iso_utc_or_local_BI(
+        putBI("isoLocalM", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_MINUTES, /* useUTC = */ false));
-        putBI("iso_local_m_nz", "isoLocalMNZ", new iso_utc_or_local_BI(
+        putBI("isoLocalMNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_MINUTES, /* useUTC = */ false));
         
-        putBI("iso_local_h", "isoLocalH", new iso_utc_or_local_BI(
+        putBI("isoLocalH", new iso_utc_or_local_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_HOURS, /* useUTC = */ false));
-        putBI("iso_local_h_nz", "isoLocalHNZ", new iso_utc_or_local_BI(
+        putBI("isoLocalHNZ", new iso_utc_or_local_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_HOURS, /* useUTC = */ false));
         
         putBI("iso", new iso_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_SECONDS));
-        putBI("iso_nz", "isoNZ", new iso_BI(
+        putBI("isoNZ", new iso_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_SECONDS));
         
-        putBI("iso_ms", "isoMs", new iso_BI(
+        putBI("isoMs", new iso_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_MILLISECONDS));
-        putBI("iso_ms_nz", "isoMsNZ", new iso_BI(
+        putBI("isoMsNZ", new iso_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_MILLISECONDS));
         
-        putBI("iso_m", "isoM", new iso_BI(
+        putBI("isoM", new iso_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_MINUTES));
-        putBI("iso_m_nz", "isoMNZ", new iso_BI(
+        putBI("isoMNZ", new iso_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_MINUTES));
         
-        putBI("iso_h", "isoH", new iso_BI(
+        putBI("isoH", new iso_BI(
                 /* showOffset = */ null, _DateUtil.ACCURACY_HOURS));
-        putBI("iso_h_nz", "isoHNZ", new iso_BI(
+        putBI("isoHNZ", new iso_BI(
                 /* showOffset = */ Boolean.FALSE, _DateUtil.ACCURACY_HOURS));
         
-        putBI("j_string", "jString", new BuiltInsForStringsEncoding.j_stringBI());
+        putBI("jString", new BuiltInsForStringsEncoding.j_stringBI());
         putBI("join", new BuiltInsForSequences.joinBI());
-        putBI("js_string", "jsString", new BuiltInsForStringsEncoding.js_stringBI());
-        putBI("json_string", "jsonString", new BuiltInsForStringsEncoding.json_stringBI());
-        putBI("keep_after", "keepAfter", new BuiltInsForStringsBasic.keep_afterBI());
-        putBI("keep_before", "keepBefore", new BuiltInsForStringsBasic.keep_beforeBI());
-        putBI("keep_after_last", "keepAfterLast", new BuiltInsForStringsBasic.keep_after_lastBI());
-        putBI("keep_before_last", "keepBeforeLast", new BuiltInsForStringsBasic.keep_before_lastBI());
+        putBI("jsString", new BuiltInsForStringsEncoding.js_stringBI());
+        putBI("jsonString", new BuiltInsForStringsEncoding.json_stringBI());
+        putBI("keepAfter", new BuiltInsForStringsBasic.keep_afterBI());
+        putBI("keepBefore", new BuiltInsForStringsBasic.keep_beforeBI());
+        putBI("keepAfterLast", new BuiltInsForStringsBasic.keep_after_lastBI());
+        putBI("keepBeforeLast", new BuiltInsForStringsBasic.keep_before_lastBI());
         putBI("keys", new BuiltInsForHashes.keysBI());
-        putBI("last_index_of", "lastIndexOf", new BuiltInsForStringsBasic.index_ofBI(true));
+        putBI("lastIndexOf", new BuiltInsForStringsBasic.index_ofBI(true));
         putBI("last", new lastBI());
-        putBI("left_pad", "leftPad", new BuiltInsForStringsBasic.padBI(true));
+        putBI("leftPad", new BuiltInsForStringsBasic.padBI(true));
         putBI("length", new BuiltInsForStringsBasic.lengthBI());
         putBI("long", new longBI());
-        putBI("lower_abc", "lowerAbc", new BuiltInsForNumbers.lower_abcBI());
-        putBI("lower_case", "lowerCase", new BuiltInsForStringsBasic.lower_caseBI());
+        putBI("lowerAbc", new BuiltInsForNumbers.lower_abcBI());
+        putBI("lowerCase", new BuiltInsForStringsBasic.lower_caseBI());
         putBI("namespace", new BuiltInsForMultipleTypes.namespaceBI());
         putBI("new", new BuiltInsForStringsMisc.newBI());
-        putBI("markup_string", "markupString", new markup_stringBI());
-        putBI("node_name", "nodeName", new node_nameBI());
-        putBI("node_namespace", "nodeNamespace", new node_namespaceBI());
-        putBI("node_type", "nodeType", new node_typeBI());
-        putBI("no_esc", "noEsc", new no_escBI());
+        putBI("markupString", new markup_stringBI());
+        putBI("nodeName", new node_nameBI());
+        putBI("nodeNamespace", new node_namespaceBI());
+        putBI("nodeType", new node_typeBI());
+        putBI("noEsc", new no_escBI());
         putBI("number", new BuiltInsForStringsMisc.numberBI());
-        putBI("number_to_date", "numberToDate", new number_to_dateBI(TemplateDateModel.DATE));
-        putBI("number_to_time", "numberToTime", new number_to_dateBI(TemplateDateModel.TIME));
-        putBI("number_to_datetime", "numberToDatetime", new number_to_dateBI(TemplateDateModel.DATETIME));
+        putBI("numberToDate", new number_to_dateBI(TemplateDateModel.DATE));
+        putBI("numberToTime", new number_to_dateBI(TemplateDateModel.TIME));
+        putBI("numberToDatetime", new number_to_dateBI(TemplateDateModel.DATETIME));
         putBI("parent", new parentBI());
-        putBI("previous_sibling", "previousSibling", new previousSiblingBI());
-        putBI("next_sibling", "nextSibling", new nextSiblingBI());
-        putBI("item_parity", "itemParity", new BuiltInsForLoopVariables.item_parityBI());
-        putBI("item_parity_cap", "itemParityCap", new BuiltInsForLoopVariables.item_parity_capBI());
+        putBI("previousSibling", new previousSiblingBI());
+        putBI("nextSibling", new nextSiblingBI());
+        putBI("itemParity", new BuiltInsForLoopVariables.item_parityBI());
+        putBI("itemParityCap", new BuiltInsForLoopVariables.item_parity_capBI());
         putBI("reverse", new reverseBI());
-        putBI("right_pad", "rightPad", new BuiltInsForStringsBasic.padBI(false));
+        putBI("rightPad", new BuiltInsForStringsBasic.padBI(false));
         putBI("root", new rootBI());
         putBI("round", new roundBI());
-        putBI("remove_ending", "removeEnding", new BuiltInsForStringsBasic.remove_endingBI());
-        putBI("remove_beginning", "removeBeginning", new BuiltInsForStringsBasic.remove_beginningBI());
+        putBI("removeEnding", new BuiltInsForStringsBasic.remove_endingBI());
+        putBI("removeBeginning", new BuiltInsForStringsBasic.remove_beginningBI());
         putBI("rtf", new BuiltInsForStringsEncoding.rtfBI());
-        putBI("seq_contains", "seqContains", new seq_containsBI());
-        putBI("seq_index_of", "seqIndexOf", new seq_index_ofBI(1));
-        putBI("seq_last_index_of", "seqLastIndexOf", new seq_index_ofBI(-1));
+        putBI("seqContains", new seq_containsBI());
+        putBI("seqIndexOf", new seq_index_ofBI(1));
+        putBI("seqLastIndexOf", new seq_index_ofBI(-1));
         putBI("short", new shortBI());
         putBI("size", new BuiltInsForMultipleTypes.sizeBI());
-        putBI("sort_by", "sortBy", new sort_byBI());
+        putBI("sortBy", new sort_byBI());
         putBI("sort", new sortBI());
         putBI("split", new BuiltInsForStringsBasic.split_BI());
         putBI("switch", new BuiltInsWithParseTimeParameters.switch_BI());
-        putBI("starts_with", "startsWith", new BuiltInsForStringsBasic.starts_withBI());
+        putBI("startsWith", new BuiltInsForStringsBasic.starts_withBI());
         putBI("string", new BuiltInsForMultipleTypes.stringBI());
         putBI("substring", new BuiltInsForStringsBasic.substringBI());
         putBI("then", new BuiltInsWithParseTimeParameters.then_BI());
         putBI("time", new BuiltInsForMultipleTypes.dateBI(TemplateDateModel.TIME));
-        putBI("time_if_unknown", "timeIfUnknown", new BuiltInsForDates.dateType_if_unknownBI(TemplateDateModel.TIME));
+        putBI("timeIfUnknown", new BuiltInsForDates.dateType_if_unknownBI(TemplateDateModel.TIME));
         putBI("trim", new BuiltInsForStringsBasic.trimBI());
-        putBI("uncap_first", "uncapFirst", new BuiltInsForStringsBasic.uncap_firstBI());
-        putBI("upper_abc", "upperAbc", new BuiltInsForNumbers.upper_abcBI());
-        putBI("upper_case", "upperCase", new BuiltInsForStringsBasic.upper_caseBI());
+        putBI("uncapFirst", new BuiltInsForStringsBasic.uncap_firstBI());
+        putBI("upperAbc", new BuiltInsForNumbers.upper_abcBI());
+        putBI("upperCase", new BuiltInsForStringsBasic.upper_caseBI());
         putBI("url", new BuiltInsForStringsEncoding.urlBI());
-        putBI("url_path", "urlPath", new BuiltInsForStringsEncoding.urlPathBI());
+        putBI("urlPath", new BuiltInsForStringsEncoding.urlPathBI());
         putBI("values", new BuiltInsForHashes.valuesBI());
-        putBI("web_safe", "webSafe", BUILT_INS_BY_NAME.get("html"));  // deprecated; use ?html instead
-        putBI("word_list", "wordList", new BuiltInsForStringsBasic.word_listBI());
+        putBI("webSafe", BUILT_INS_BY_NAME.get("html"));  // deprecated; use ?html instead
+        putBI("wordList", new BuiltInsForStringsBasic.word_listBI());
         putBI("xhtml", new BuiltInsForStringsEncoding.xhtmlBI());
         putBI("xml", new BuiltInsForStringsEncoding.xmlBI());
         putBI("matches", new BuiltInsForStringsRegexp.matchesBI());
@@ -295,17 +291,8 @@ abstract class ASTExpBuiltIn extends ASTExpression implements Cloneable {
     
     private static void putBI(String name, ASTExpBuiltIn bi) {
         BUILT_INS_BY_NAME.put(name, bi);
-        SNAKE_CASE_NAMES.add(name);
-        CAMEL_CASE_NAMES.add(name);
     }
 
-    private static void putBI(String nameSnakeCase, String nameCamelCase, ASTExpBuiltIn bi) {
-        BUILT_INS_BY_NAME.put(nameSnakeCase, bi);
-        BUILT_INS_BY_NAME.put(nameCamelCase, bi);
-        SNAKE_CASE_NAMES.add(nameSnakeCase);
-        CAMEL_CASE_NAMES.add(nameCamelCase);
-    }
-    
     /**
      * @param target
      *            Left-hand-operand expression
@@ -328,32 +315,20 @@ abstract class ASTExpBuiltIn extends ASTExpression implements Cloneable {
             Collections.sort(names);
             char lastLetter = 0;
 
-            NamingConvention shownNamingConvention;
-            {
-                NamingConvention namingConvention = tokenManager.namingConvention;
-                shownNamingConvention = namingConvention != NamingConvention.AUTO_DETECT
-                        ? namingConvention : NamingConvention.LEGACY /* [2.4] CAMEL_CASE */;
-            }
-            
             boolean first = true;
             for (String correctName : names) {
-                NamingConvention correctNameNamingConvetion = _StringUtil.getIdentifierNamingConvention(correctName);
-                if (shownNamingConvention == NamingConvention.CAMEL_CASE
-                        ? correctNameNamingConvetion != NamingConvention.LEGACY
-                        : correctNameNamingConvetion != NamingConvention.CAMEL_CASE) {
-                    if (first) {
-                        first = false;
-                    } else {
-                        buf.append(", ");
-                    }
+                if (first) {
+                    first = false;
+                } else {
+                    buf.append(", ");
+                }
 
-                    char firstChar = correctName.charAt(0);
-                    if (firstChar != lastLetter) {
-                        lastLetter = firstChar;
-                        buf.append('\n');
-                    }
-                    buf.append(correctName);
+                char firstChar = correctName.charAt(0);
+                if (firstChar != lastLetter) {
+                    lastLetter = firstChar;
+                    buf.append('\n');
                 }
+                buf.append(correctName);
             }
                 
             throw new ParseException(buf.toString(), null, keyTk);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltInVariable.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltInVariable.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltInVariable.java
index d2304fe..c7afcda 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltInVariable.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpBuiltInVariable.java
@@ -36,73 +36,51 @@ import org.apache.freemarker.core.util._StringUtil;
  */
 final class ASTExpBuiltInVariable extends ASTExpression {
 
-    static final String TEMPLATE_NAME_CC = "templateName";
-    static final String TEMPLATE_NAME = "template_name";
-    static final String MAIN_TEMPLATE_NAME_CC = "mainTemplateName";
-    static final String MAIN_TEMPLATE_NAME = "main_template_name";
-    static final String CURRENT_TEMPLATE_NAME_CC = "currentTemplateName";
-    static final String CURRENT_TEMPLATE_NAME = "current_template_name";
+    static final String TEMPLATE_NAME = "templateName";
+    static final String MAIN_TEMPLATE_NAME = "mainTemplateName";
+    static final String CURRENT_TEMPLATE_NAME = "currentTemplateName";
     static final String NAMESPACE = "namespace";
     static final String MAIN = "main";
     static final String GLOBALS = "globals";
     static final String LOCALS = "locals";
-    static final String DATA_MODEL_CC = "dataModel";
-    static final String DATA_MODEL = "data_model";
+    static final String DATA_MODEL = "dataModel";
     static final String LANG = "lang";
     static final String LOCALE = "locale";
-    static final String LOCALE_OBJECT_CC = "localeObject";
-    static final String LOCALE_OBJECT = "locale_object";
-    static final String CURRENT_NODE_CC = "currentNode";
-    static final String CURRENT_NODE = "current_node";
+    static final String LOCALE_OBJECT = "localeObject";
+    static final String CURRENT_NODE = "currentNode";
     static final String NODE = "node";
     static final String PASS = "pass";
     static final String VARS = "vars";
     static final String VERSION = "version";
-    static final String INCOMPATIBLE_IMPROVEMENTS_CC = "incompatibleImprovements";
-    static final String INCOMPATIBLE_IMPROVEMENTS = "incompatible_improvements";
+    static final String INCOMPATIBLE_IMPROVEMENTS = "incompatibleImprovements";
     static final String ERROR = "error";
-    static final String OUTPUT_ENCODING_CC = "outputEncoding";
-    static final String OUTPUT_ENCODING = "output_encoding";
-    static final String OUTPUT_FORMAT_CC = "outputFormat";
-    static final String OUTPUT_FORMAT = "output_format";
-    static final String AUTO_ESC_CC = "autoEsc";
-    static final String AUTO_ESC = "auto_esc";
-    static final String URL_ESCAPING_CHARSET_CC = "urlEscapingCharset";
-    static final String URL_ESCAPING_CHARSET = "url_escaping_charset";
+    static final String OUTPUT_ENCODING = "outputEncoding";
+    static final String OUTPUT_FORMAT = "outputFormat";
+    static final String AUTO_ESC = "autoEsc";
+    static final String URL_ESCAPING_CHARSET = "urlEscapingCharset";
     static final String NOW = "now";
     
-    static final String[] SPEC_VAR_NAMES = new String[] {
-        AUTO_ESC_CC,
+    static final String[] BUILT_IN_VARIABLE_NAMES = new String[] {
         AUTO_ESC,
-        CURRENT_NODE_CC,
-        CURRENT_TEMPLATE_NAME_CC,
         CURRENT_NODE,
         CURRENT_TEMPLATE_NAME,
-        DATA_MODEL_CC,
         DATA_MODEL,
         ERROR,
         GLOBALS,
-        INCOMPATIBLE_IMPROVEMENTS_CC,
         INCOMPATIBLE_IMPROVEMENTS,
         LANG,
         LOCALE,
-        LOCALE_OBJECT_CC,
         LOCALE_OBJECT,
         LOCALS,
         MAIN,
-        MAIN_TEMPLATE_NAME_CC,
         MAIN_TEMPLATE_NAME,
         NAMESPACE,
         NODE,
         NOW,
-        OUTPUT_ENCODING_CC,
-        OUTPUT_FORMAT_CC,
         OUTPUT_ENCODING,
         OUTPUT_FORMAT,
         PASS,
-        TEMPLATE_NAME_CC,
         TEMPLATE_NAME,
-        URL_ESCAPING_CHARSET_CC,
         URL_ESCAPING_CHARSET,
         VARS,
         VERSION
@@ -115,23 +93,16 @@ final class ASTExpBuiltInVariable extends ASTExpression {
             throws ParseException {
         String name = nameTk.image;
         this.parseTimeValue = parseTimeValue;
-        if (Arrays.binarySearch(SPEC_VAR_NAMES, name) < 0) {
+        if (Arrays.binarySearch(BUILT_IN_VARIABLE_NAMES, name) < 0) {
             StringBuilder sb = new StringBuilder();
             sb.append("Unknown special variable name: ");
             sb.append(_StringUtil.jQuote(name)).append(".");
 
-            NamingConvention shownNamingConvention;
-            {
-                NamingConvention namingConvention = tokenManager.namingConvention;
-                shownNamingConvention = namingConvention != NamingConvention.AUTO_DETECT
-                        ? namingConvention : NamingConvention.LEGACY /* [2.4] CAMEL_CASE */;
-            }
-            
             {
                 String correctName;
-                if (name.equals("auto_escape") || name.equals("auto_escaping") || name.equals("autoesc")) {
-                    correctName = "auto_esc";
-                } else if (name.equals("autoEscape") || name.equals("autoEscaping")) {
+                if (
+                        name.equals("auto_escape") || name.equals("auto_escaping") || name.equals("autoEsc") ||
+                        name.equals("autoEscape") || name.equals("autoEscaping")) {
                     correctName = "autoEsc";
                 } else {
                     correctName = null;
@@ -144,18 +115,13 @@ final class ASTExpBuiltInVariable extends ASTExpression {
             
             sb.append("\nThe allowed special variable names are: ");
             boolean first = true;
-            for (final String correctName : SPEC_VAR_NAMES) {
-                NamingConvention correctNameNamingConvention = _StringUtil.getIdentifierNamingConvention(correctName);
-                if (shownNamingConvention == NamingConvention.CAMEL_CASE
-                        ? correctNameNamingConvention != NamingConvention.LEGACY
-                        : correctNameNamingConvention != NamingConvention.CAMEL_CASE) {
-                    if (first) {
-                        first = false;
-                    } else {
-                        sb.append(", ");
-                    }
-                    sb.append(correctName);
+            for (final String correctName : BUILT_IN_VARIABLE_NAMES) {
+                if (first) {
+                    first = false;
+                } else {
+                    sb.append(", ");
                 }
+                sb.append(correctName);
             }
             throw new ParseException(sb.toString(), null, nameTk);
         }
@@ -181,7 +147,7 @@ final class ASTExpBuiltInVariable extends ASTExpression {
             ASTDirMacro.Context ctx = env.getCurrentMacroContext();
             return ctx == null ? null : ctx.getLocals();
         }
-        if (name == DATA_MODEL || name == DATA_MODEL_CC) {
+        if (name == DATA_MODEL) {
             return env.getDataModel();
         }
         if (name == VARS) {
@@ -190,31 +156,30 @@ final class ASTExpBuiltInVariable extends ASTExpression {
         if (name == LOCALE) {
             return new SimpleScalar(env.getLocale().toString());
         }
-        if (name == LOCALE_OBJECT || name == LOCALE_OBJECT_CC) {
+        if (name == LOCALE_OBJECT) {
             return env.getObjectWrapper().wrap(env.getLocale());
         }
         if (name == LANG) {
             return new SimpleScalar(env.getLocale().getLanguage());
         }
-        if (name == CURRENT_NODE || name == NODE || name == CURRENT_NODE_CC) {
+        if (name == CURRENT_NODE || name == NODE) {
             return env.getCurrentVisitorNode();
         }
-        if (name == MAIN_TEMPLATE_NAME || name == MAIN_TEMPLATE_NAME_CC) {
+        if (name == MAIN_TEMPLATE_NAME) {
             return SimpleScalar.newInstanceOrNull(env.getMainTemplate().getLookupName());
         }
         // [FM3] Some of these two should be removed.
-        if (name == CURRENT_TEMPLATE_NAME || name == CURRENT_TEMPLATE_NAME_CC
-                || name == TEMPLATE_NAME || name == TEMPLATE_NAME_CC) {
+        if (name == CURRENT_TEMPLATE_NAME || name == TEMPLATE_NAME) {
             return SimpleScalar.newInstanceOrNull(env.getCurrentTemplate().getLookupName());
         }
         if (name == PASS) {
             return ASTDirMacro.DO_NOTHING_MACRO;
         }
-        if (name == OUTPUT_ENCODING || name == OUTPUT_ENCODING_CC) {
+        if (name == OUTPUT_ENCODING) {
             Charset encoding = env.getOutputEncoding();
             return encoding != null ? new SimpleScalar(encoding.name()) : null;
         }
-        if (name == URL_ESCAPING_CHARSET || name == URL_ESCAPING_CHARSET_CC) {
+        if (name == URL_ESCAPING_CHARSET) {
             Charset charset = env.getURLEscapingCharset();
             return charset != null ? new SimpleScalar(charset.name()) : null;
         }
@@ -227,7 +192,7 @@ final class ASTExpBuiltInVariable extends ASTExpression {
         if (name == VERSION) {
             return new SimpleScalar(Configuration.getVersion().toString());
         }
-        if (name == INCOMPATIBLE_IMPROVEMENTS || name == INCOMPATIBLE_IMPROVEMENTS_CC) {
+        if (name == INCOMPATIBLE_IMPROVEMENTS) {
             return new SimpleScalar(env.getConfiguration().getIncompatibleImprovements().toString());
         }
         

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpStringLiteral.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpStringLiteral.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpStringLiteral.java
index 82901b2..b66eb1d 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpStringLiteral.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTExpStringLiteral.java
@@ -45,8 +45,8 @@ final class ASTExpStringLiteral extends ASTExpression implements TemplateScalarM
     
     /**
      * @param parentTkMan
-     *            The token source of the template that contains this string literal. As of this writing, we only need
-     *            this to share the {@code namingConvetion} with that.
+     *            The token source of the template that contains this string literal. This is possibly needed to
+     *            inherit tokenizer-level auto-detected settings.
      */
     void parseValue(FMParserTokenManager parentTkMan, OutputFormat outputFormat) throws ParseException {
         // The way this works is incorrect (the literal should be parsed without un-escaping),

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTImplicitParent.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTImplicitParent.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTImplicitParent.java
index 453bcf5..97991a7 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTImplicitParent.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTImplicitParent.java
@@ -71,7 +71,7 @@ final class ASTImplicitParent extends ASTElement {
 
     @Override
     String getASTNodeDescriptor() {
-        return "#mixed_content";
+        return "#mixedContent";
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ASTStaticText.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTStaticText.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTStaticText.java
index 4353400..1ed4d2d 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ASTStaticText.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ASTStaticText.java
@@ -72,7 +72,7 @@ final class ASTStaticText extends ASTElement {
         if (canonical) {
             String text = new String(this.text);
             if (unparsed) {
-                return "<#noparse>" + text + "</#noparse>";
+                return "<#noParse>" + text + "</#noParse>";
             }
             return text;
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForSequences.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForSequences.java b/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForSequences.java
index 814b362..e131406 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForSequences.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForSequences.java
@@ -702,9 +702,9 @@ class BuiltInsForSequences {
                             throw new _TemplateModelException(
                                     startErrorMessage(keyNamesLn, i),
                                     (keyNameI == 0
-                                            ? "Sequence items must be hashes when using ?sort_by. "
+                                            ? "Sequence items must be hashes when using ?sortBy. "
                                             : "The " + _StringUtil.jQuote(keyNames[keyNameI - 1])),
-                                    " subvariable is not a hash, so ?sort_by ",
+                                    " subvariable is not a hash, so ?sortBy ",
                                     "can't proceed with getting the ",
                                     new _DelayedJQuote(keyNames[keyNameI]),
                                     " subvariable.");
@@ -818,12 +818,12 @@ class BuiltInsForSequences {
         }
 
         static Object[] startErrorMessage(int keyNamesLn) {
-            return new Object[] { (keyNamesLn == 0 ? "?sort" : "?sort_by(...)"), " failed: " };
+            return new Object[] { (keyNamesLn == 0 ? "?sort" : "?sortBy(...)"), " failed: " };
         }
         
         static Object[] startErrorMessage(int keyNamesLn, int index) {
             return new Object[] {
-                    (keyNamesLn == 0 ? "?sort" : "?sort_by(...)"),
+                    (keyNamesLn == 0 ? "?sort" : "?sortBy(...)"),
                     " failed at sequence index ", Integer.valueOf(index),
                     (index == 0 ? ": " : " (0-based): ") };
         }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsBasic.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsBasic.java b/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsBasic.java
index bcf00c4..e8cd15c 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsBasic.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsBasic.java
@@ -89,7 +89,7 @@ class BuiltInsForStringsBasic {
         @Override
         TemplateModel _eval(Environment env) throws TemplateException {
             return new BIMethod(target.evalAndCoerceToStringOrUnsupportedMarkup(env,
-                    "For sequences/collections (lists and such) use \"?seq_contains\" instead."));
+                    "For sequences/collections (lists and such) use \"?seqContains\" instead."));
         }
     }
 
@@ -221,7 +221,7 @@ class BuiltInsForStringsBasic {
         @Override
         TemplateModel _eval(Environment env) throws TemplateException {
             return new BIMethod(target.evalAndCoerceToStringOrUnsupportedMarkup(env,
-                    "For sequences/collections (lists and such) use \"?seq_index_of\" instead."));
+                    "For sequences/collections (lists and such) use \"?seqIndexOf\" instead."));
         }
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsEncoding.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsEncoding.java b/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsEncoding.java
index 80eb9d3..bfb44c6 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsEncoding.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/BuiltInsForStringsEncoding.java
@@ -177,7 +177,7 @@ class BuiltInsForStringsEncoding {
                             + "programmers to fix it. Or, as a last chance, "
                             + "you can set the url_encoding_charset setting in "
                             + "the template, e.g. "
-                            + "<#setting url_escaping_charset='ISO-8859-1'>, or "
+                            + "<#setting urlEscapingCharset='ISO-8859-1'>, or "
                             + "give the charset explicitly to the buit-in, e.g. "
                             + "foo?url('ISO-8859-1').");
                 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/Configuration.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/Configuration.java b/freemarker-core/src/main/java/org/apache/freemarker/core/Configuration.java
index 9f31556..cd3a524 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/Configuration.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/Configuration.java
@@ -80,7 +80,6 @@ import org.apache.freemarker.core.templateresolver.impl.DefaultTemplateNameForma
 import org.apache.freemarker.core.templateresolver.impl.DefaultTemplateResolver;
 import org.apache.freemarker.core.templateresolver.impl.MruCacheStorage;
 import org.apache.freemarker.core.templateresolver.impl.SoftCacheStorage;
-import org.apache.freemarker.core.util.BugException;
 import org.apache.freemarker.core.util.CaptureOutput;
 import org.apache.freemarker.core.util.HtmlEscape;
 import org.apache.freemarker.core.util.NormalizeNewlines;
@@ -139,36 +138,6 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
     
     private static final String VERSION_PROPERTIES_PATH = "org/apache/freemarker/core/version.properties";
 
-    private static final String[] SETTING_NAMES_SNAKE_CASE = new String[] {
-            // Must be sorted alphabetically!
-            ExtendableBuilder.INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE,
-            ExtendableBuilder.LOCALIZED_TEMPLATE_LOOKUP_KEY_SNAKE_CASE,
-            ExtendableBuilder.OBJECT_WRAPPER_KEY_SNAKE_CASE,
-            ExtendableBuilder.REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_SNAKE_CASE,
-            ExtendableBuilder.SHARED_VARIABLES_KEY_SNAKE_CASE,
-            ExtendableBuilder.TEMPLATE_CACHE_STORAGE_KEY_SNAKE_CASE,
-            ExtendableBuilder.TEMPLATE_CONFIGURATIONS_KEY_SNAKE_CASE,
-            ExtendableBuilder.TEMPLATE_LOADER_KEY_SNAKE_CASE,
-            ExtendableBuilder.TEMPLATE_LOOKUP_STRATEGY_KEY_SNAKE_CASE,
-            ExtendableBuilder.TEMPLATE_NAME_FORMAT_KEY_SNAKE_CASE,
-            ExtendableBuilder.TEMPLATE_UPDATE_DELAY_KEY_SNAKE_CASE
-    };
-
-    private static final String[] SETTING_NAMES_CAMEL_CASE = new String[] {
-            // Must be sorted alphabetically!
-            ExtendableBuilder.INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE,
-            ExtendableBuilder.LOCALIZED_TEMPLATE_LOOKUP_KEY_CAMEL_CASE,
-            ExtendableBuilder.OBJECT_WRAPPER_KEY_CAMEL_CASE,
-            ExtendableBuilder.REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_CAMEL_CASE,
-            ExtendableBuilder.SHARED_VARIABLES_KEY_CAMEL_CASE,
-            ExtendableBuilder.TEMPLATE_CACHE_STORAGE_KEY_CAMEL_CASE,
-            ExtendableBuilder.TEMPLATE_CONFIGURATIONS_KEY_CAMEL_CASE,
-            ExtendableBuilder.TEMPLATE_LOADER_KEY_CAMEL_CASE,
-            ExtendableBuilder.TEMPLATE_LOOKUP_STRATEGY_KEY_CAMEL_CASE,
-            ExtendableBuilder.TEMPLATE_NAME_FORMAT_KEY_CAMEL_CASE,
-            ExtendableBuilder.TEMPLATE_UPDATE_DELAY_KEY_CAMEL_CASE
-    };
-    
     private static final Map<String, OutputFormat> STANDARD_OUTPUT_FORMATS;
     static {
         STANDARD_OUTPUT_FORMATS = new HashMap<>();
@@ -235,7 +204,6 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
 
     private final TemplateLanguage templateLanguage;
     private final TagSyntax tagSyntax;
-    private final NamingConvention namingConvention;
     private final boolean whitespaceStripping;
     private final AutoEscapingPolicy autoEscapingPolicy;
     private final OutputFormat outputFormat;
@@ -401,7 +369,6 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
 
         templateLanguage = builder.getTemplateLanguage();
         tagSyntax = builder.getTagSyntax();
-        namingConvention = builder.getNamingConvention();
         whitespaceStripping = builder.getWhitespaceStripping();
         autoEscapingPolicy = builder.getAutoEscapingPolicy();
         outputFormat = builder.getOutputFormat();
@@ -650,6 +617,11 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
     }
 
     @Override
+    public boolean isIncompatibleImprovementsSet() {
+        return true;
+    }
+
+    @Override
     public boolean getWhitespaceStripping() {
         return whitespaceStripping;
     }
@@ -873,20 +845,6 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
     }
 
     @Override
-    public NamingConvention getNamingConvention() {
-        return namingConvention;
-    }
-
-    /**
-     * Always {@code true} in {@link Configuration}-s; even if this setting wasn't set in the builder, it gets a default
-     * value in the {@link Configuration}.
-     */
-    @Override
-    public boolean isNamingConventionSet() {
-        return true;
-    }
-
-    @Override
     public int getTabSize() {
         return tabSize;
     }
@@ -1354,7 +1312,7 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
      *            not {@code null}). This parameter also drives localized template lookup. Assuming that you have
      *            specified {@code en_US} as the locale and {@code myTemplate.ftl} as the name of the template, and the
      *            default {@link TemplateLookupStrategy} is used and
-     *            {@code #setLocalizedTemplateLookup(boolean) localized_template_lookup} is {@code true}, FreeMarker will first try to
+     *            {@code #setLocalizedTemplateLookup(boolean) localizedTemplateLookup} is {@code true}, FreeMarker will first try to
      *            retrieve {@code myTemplate_en_US.html}, then {@code myTemplate.en.ftl}, and finally
      *            {@code myTemplate.ftl}. Note that that the template's locale will be {@code en_US} even if it only
      *            finds {@code myTemplate.ftl}. Note that when the {@code locale} setting is overridden with a
@@ -1406,7 +1364,7 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
             String msg; 
             if (tl == null) {
                 msg = "Don't know where to load template " + _StringUtil.jQuote(name)
-                      + " from because the \"template_loader\" FreeMarker "
+                      + " from because the \"templateLoader\" FreeMarker "
                       + "setting wasn't set (Configuration.setTemplateLoader), so it's null.";
             } else {
                 final String missingTempNormName = maybeTemp.getMissingTemplateNormalizedName();
@@ -1544,67 +1502,20 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
     }
     
     /**
-     * Same as {@link #getSupportedBuiltInNames(NamingConvention)} with argument {@link #getNamingConvention()}.
-     */
-    public Set getSupportedBuiltInNames() {
-        return getSupportedBuiltInNames(getNamingConvention());
-    }
-
-    /**
      * Returns the names of the supported "built-ins". These are the ({@code expr?builtin_name}-like things). As of this
      * writing, this information doesn't depend on the configuration options, so it could be a static method, but
      * to be future-proof, it's an instance method. 
-     * 
-     * @param namingConvention
-     *            One of {@link NamingConvention#AUTO_DETECT},
-     *            {@link NamingConvention#LEGACY}, and
-     *            {@link NamingConvention#CAMEL_CASE}. If it's
-     *            {@link NamingConvention#AUTO_DETECT} then the union
-     *            of the names in all the naming conventions is returned.
      */
-    public Set<String> getSupportedBuiltInNames(NamingConvention namingConvention) {
-        Set<String> names;
-        if (namingConvention == NamingConvention.AUTO_DETECT) {
-            names = ASTExpBuiltIn.BUILT_INS_BY_NAME.keySet();
-        } else if (namingConvention == NamingConvention.LEGACY) {
-            names = ASTExpBuiltIn.SNAKE_CASE_NAMES;
-        } else if (namingConvention == NamingConvention.CAMEL_CASE) {
-            names = ASTExpBuiltIn.CAMEL_CASE_NAMES;
-        } else {
-            throw new BugException("Unsupported naming convention constant: " + namingConvention);
-        }
-        return Collections.unmodifiableSet(names);
+    public Set<String> getSupportedBuiltInNames() {
+        return Collections.unmodifiableSet(ASTExpBuiltIn.BUILT_INS_BY_NAME.keySet());
     }
     
     /**
-     * Same as {@link #getSupportedBuiltInDirectiveNames(NamingConvention)} with argument
-     * {@link #getNamingConvention()}.
-     */
-    public Set getSupportedBuiltInDirectiveNames() {
-        return getSupportedBuiltInDirectiveNames(getNamingConvention());
-    }
-
-    /**
      * Returns the names of the directives that are predefined by FreeMarker. These are the things that you call like
      * <tt>&lt;#directiveName ...&gt;</tt>.
-     * 
-     * @param namingConvention
-     *            One of {@link NamingConvention#AUTO_DETECT},
-     *            {@link NamingConvention#LEGACY}, and
-     *            {@link NamingConvention#CAMEL_CASE}. If it's
-     *            {@link NamingConvention#AUTO_DETECT} then the union
-     *            of the names in all the naming conventions is returned. 
      */
-    public Set<String> getSupportedBuiltInDirectiveNames(NamingConvention namingConvention) {
-        if (namingConvention == NamingConvention.AUTO_DETECT) {
-            return ASTDirective.ALL_BUILT_IN_DIRECTIVE_NAMES;
-        } else if (namingConvention == NamingConvention.LEGACY) {
-            return ASTDirective.LEGACY_BUILT_IN_DIRECTIVE_NAMES;
-        } else if (namingConvention == NamingConvention.CAMEL_CASE) {
-            return ASTDirective.CAMEL_CASE_BUILT_IN_DIRECTIVE_NAMES;
-        } else {
-            throw new BugException("Unsupported naming convention constant: " + namingConvention);
-        }
+    public Set<String> getSupportedBuiltInDirectiveNames() {
+        return ASTDirective.BUILT_IN_DIRECTIVE_NAMES;
     }
     
     private static String getRequiredVersionProperty(Properties vp, String properyName) {
@@ -1626,82 +1537,34 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
             extends MutableParsingAndProcessingConfiguration<SelfT>
             implements TopLevelConfiguration, org.apache.freemarker.core.util.CommonBuilder<Configuration> {
 
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String LOCALIZED_TEMPLATE_LOOKUP_KEY_SNAKE_CASE = "localized_template_lookup";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String LOCALIZED_TEMPLATE_LOOKUP_KEY = LOCALIZED_TEMPLATE_LOOKUP_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String LOCALIZED_TEMPLATE_LOOKUP_KEY_CAMEL_CASE = "localizedTemplateLookup";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_SNAKE_CASE = "registered_custom_output_formats";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY = REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_CAMEL_CASE = "registeredCustomOutputFormats";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String TEMPLATE_CACHE_STORAGE_KEY_SNAKE_CASE = "template_cache_storage";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String TEMPLATE_CACHE_STORAGE_KEY = TEMPLATE_CACHE_STORAGE_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String TEMPLATE_CACHE_STORAGE_KEY_CAMEL_CASE = "templateCacheStorage";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String TEMPLATE_UPDATE_DELAY_KEY_SNAKE_CASE = "template_update_delay";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String TEMPLATE_UPDATE_DELAY_KEY = TEMPLATE_UPDATE_DELAY_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String TEMPLATE_UPDATE_DELAY_KEY_CAMEL_CASE = "templateUpdateDelay";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String TEMPLATE_LOADER_KEY_SNAKE_CASE = "template_loader";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String TEMPLATE_LOADER_KEY = TEMPLATE_LOADER_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String TEMPLATE_LOADER_KEY_CAMEL_CASE = "templateLoader";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String TEMPLATE_LOOKUP_STRATEGY_KEY_SNAKE_CASE = "template_lookup_strategy";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String TEMPLATE_LOOKUP_STRATEGY_KEY = TEMPLATE_LOOKUP_STRATEGY_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String TEMPLATE_LOOKUP_STRATEGY_KEY_CAMEL_CASE = "templateLookupStrategy";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String TEMPLATE_NAME_FORMAT_KEY_SNAKE_CASE = "template_name_format";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String TEMPLATE_NAME_FORMAT_KEY = TEMPLATE_NAME_FORMAT_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String TEMPLATE_NAME_FORMAT_KEY_CAMEL_CASE = "templateNameFormat";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String SHARED_VARIABLES_KEY_SNAKE_CASE = "shared_variables";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String SHARED_VARIABLES_KEY = SHARED_VARIABLES_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String SHARED_VARIABLES_KEY_CAMEL_CASE = "sharedVariables";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String TEMPLATE_CONFIGURATIONS_KEY_SNAKE_CASE = "template_configurations";
-        /** Alias to the {@code ..._SNAKE_CASE} variation. */
-        public static final String TEMPLATE_CONFIGURATIONS_KEY = TEMPLATE_CONFIGURATIONS_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String TEMPLATE_CONFIGURATIONS_KEY_CAMEL_CASE = "templateConfigurations";
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String OBJECT_WRAPPER_KEY_SNAKE_CASE = "object_wrapper";
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String OBJECT_WRAPPER_KEY_CAMEL_CASE = "objectWrapper";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String OBJECT_WRAPPER_KEY = OBJECT_WRAPPER_KEY_SNAKE_CASE;
-
-        /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-        public static final String INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE = "incompatible_improvements";
-        /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-        public static final String INCOMPATIBLE_IMPROVEMENTS_KEY = INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE;
-        /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-        public static final String INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE = "incompatibleImprovements";
+        public static final String LOCALIZED_TEMPLATE_LOOKUP_KEY = "localizedTemplateLookup";
+        public static final String REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY = "registeredCustomOutputFormats";
+        public static final String TEMPLATE_RESOLVER_KEY = "templateResolver";
+        public static final String TEMPLATE_CACHE_STORAGE_KEY = "templateCacheStorage";
+        public static final String TEMPLATE_UPDATE_DELAY_KEY = "templateUpdateDelay";
+        public static final String TEMPLATE_LOADER_KEY = "templateLoader";
+        public static final String TEMPLATE_LOOKUP_STRATEGY_KEY = "templateLookupStrategy";
+        public static final String TEMPLATE_NAME_FORMAT_KEY = "templateNameFormat";
+        public static final String SHARED_VARIABLES_KEY = "sharedVariables";
+        public static final String TEMPLATE_CONFIGURATIONS_KEY = "templateConfigurations";
+        public static final String OBJECT_WRAPPER_KEY = "objectWrapper";
+
+        private static final _UnmodifiableCompositeSet<String> SETTING_NAMES = new _UnmodifiableCompositeSet<>(
+                MutableParsingAndProcessingConfiguration.getSettingNames(),
+                new _SortedArraySet<>(
+                        // Must be sorted alphabetically!
+                        ExtendableBuilder.LOCALIZED_TEMPLATE_LOOKUP_KEY,
+                        ExtendableBuilder.OBJECT_WRAPPER_KEY,
+                        ExtendableBuilder.REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY,
+                        ExtendableBuilder.SHARED_VARIABLES_KEY,
+                        ExtendableBuilder.TEMPLATE_CACHE_STORAGE_KEY,
+                        ExtendableBuilder.TEMPLATE_CONFIGURATIONS_KEY,
+                        ExtendableBuilder.TEMPLATE_LOADER_KEY,
+                        ExtendableBuilder.TEMPLATE_LOOKUP_STRATEGY_KEY,
+                        ExtendableBuilder.TEMPLATE_NAME_FORMAT_KEY,
+                        ExtendableBuilder.TEMPLATE_RESOLVER_KEY,
+                        ExtendableBuilder.TEMPLATE_UPDATE_DELAY_KEY
+                ));
 
         private Version incompatibleImprovements = Configuration.VERSION_3_0_0;
 
@@ -1754,11 +1617,9 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
         public void setSetting(String name, String value) throws ConfigurationException {
             boolean nameUnhandled = false;
             try {
-                if (LOCALIZED_TEMPLATE_LOOKUP_KEY_SNAKE_CASE.equals(name)
-                        || LOCALIZED_TEMPLATE_LOOKUP_KEY_CAMEL_CASE.equals(name)) {
+                if (LOCALIZED_TEMPLATE_LOOKUP_KEY.equals(name)) {
                     setLocalizedTemplateLookup(_StringUtil.getYesNo(value));
-                } else if (REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_SNAKE_CASE.equals(name)
-                        || REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_CAMEL_CASE.equals(name)) {
+                } else if (REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY.equals(name)) {
                     List list = (List) _ObjectBuilderSettingEvaluator.eval(
                             value, List.class, true, _SettingEvaluationEnvironment.getCurrent());
                     for (Object item : list) {
@@ -1768,7 +1629,7 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
                         }
                     }
                     setRegisteredCustomOutputFormats(list);
-                } else if (TEMPLATE_CACHE_STORAGE_KEY_SNAKE_CASE.equals(name) || TEMPLATE_CACHE_STORAGE_KEY_CAMEL_CASE.equals(name)) {
+                } else if (TEMPLATE_CACHE_STORAGE_KEY.equals(name)) {
                     if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
                         unsetTemplateCacheStorage();
                     } if (value.indexOf('.') == -1) {
@@ -1806,8 +1667,7 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
                         setTemplateCacheStorage((CacheStorage) _ObjectBuilderSettingEvaluator.eval(
                                 value, CacheStorage.class, false, _SettingEvaluationEnvironment.getCurrent()));
                     }
-                } else if (TEMPLATE_UPDATE_DELAY_KEY_SNAKE_CASE.equals(name)
-                        || TEMPLATE_UPDATE_DELAY_KEY_CAMEL_CASE.equals(name)) {
+                } else if (TEMPLATE_UPDATE_DELAY_KEY.equals(name)) {
                     final String valueWithoutUnit;
                     final String unit;
                     int numberEnd = 0;
@@ -1840,8 +1700,7 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
                     }
 
                     setTemplateUpdateDelayMilliseconds(parsedValue * multipier);
-                } else if (SHARED_VARIABLES_KEY_SNAKE_CASE.equals(name)
-                        || SHARED_VARIABLES_KEY_CAMEL_CASE.equals(name)) {
+                } else if (SHARED_VARIABLES_KEY.equals(name)) {
                     Map<?, ?> sharedVariables = (Map<?, ?>) _ObjectBuilderSettingEvaluator.eval(
                             value, Map.class, false, _SettingEvaluationEnvironment.getCurrent());
                     for (Object key : sharedVariables.keySet()) {
@@ -1852,42 +1711,48 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
                         }
                     }
                     setSharedVariables((Map) sharedVariables);
-                } else if (INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE.equals(name)
-                        || INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE.equals(name)) {
+                } else if (INCOMPATIBLE_IMPROVEMENTS_KEY.equals(name)) {
                     setIncompatibleImprovements(new Version(value));
-                } else if (TEMPLATE_LOADER_KEY_SNAKE_CASE.equals(name) || TEMPLATE_LOADER_KEY_CAMEL_CASE.equals(name)) {
+                } else if (TEMPLATE_RESOLVER_KEY.equals(name)) {
+                    if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
+                        unsetTemplateResolver();
+                    } else {
+                        setTemplateResolver((TemplateResolver) _ObjectBuilderSettingEvaluator.eval(
+                                value, TemplateResolver.class, false,
+                                _SettingEvaluationEnvironment.getCurrent()));
+                    }
+                } else if (TEMPLATE_LOADER_KEY.equals(name)) {
                     if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
                         unsetTemplateLoader();
                     } else {
                         setTemplateLoader((TemplateLoader) _ObjectBuilderSettingEvaluator.eval(
-                                value, TemplateLoader.class, true, _SettingEvaluationEnvironment.getCurrent()));
+                                value, TemplateLoader.class, true,
+                                _SettingEvaluationEnvironment.getCurrent()));
                     }
-                } else if (TEMPLATE_LOOKUP_STRATEGY_KEY_SNAKE_CASE.equals(name)
-                        || TEMPLATE_LOOKUP_STRATEGY_KEY_CAMEL_CASE.equals(name)) {
+                } else if (TEMPLATE_LOOKUP_STRATEGY_KEY.equals(name)) {
                     if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
                         unsetTemplateLookupStrategy();
                     } else {
                         setTemplateLookupStrategy((TemplateLookupStrategy) _ObjectBuilderSettingEvaluator.eval(
-                                value, TemplateLookupStrategy.class, false, _SettingEvaluationEnvironment.getCurrent()));
+                                value, TemplateLookupStrategy.class, false,
+                                _SettingEvaluationEnvironment.getCurrent()));
                     }
-                } else if (TEMPLATE_NAME_FORMAT_KEY_SNAKE_CASE.equals(name)
-                        || TEMPLATE_NAME_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+                } else if (TEMPLATE_NAME_FORMAT_KEY.equals(name)) {
                     if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
                         unsetTemplateNameFormat();
                     } else {
                         throw new InvalidSettingValueException(name, value,
                                 "No such predefined template name format");
                     }
-                } else if (TEMPLATE_CONFIGURATIONS_KEY_SNAKE_CASE.equals(name)
-                        || TEMPLATE_CONFIGURATIONS_KEY_CAMEL_CASE.equals(name)) {
+                } else if (TEMPLATE_CONFIGURATIONS_KEY.equals(name)) {
                     if (value.equals(NULL_VALUE)) {
                         setTemplateConfigurations(null);
                     } else {
                         setTemplateConfigurations((TemplateConfigurationFactory) _ObjectBuilderSettingEvaluator.eval(
-                                value, TemplateConfigurationFactory.class, false, _SettingEvaluationEnvironment.getCurrent()));
+                                value, TemplateConfigurationFactory.class, false,
+                                _SettingEvaluationEnvironment.getCurrent()));
                     }
-                } else if (OBJECT_WRAPPER_KEY_SNAKE_CASE.equals(name)
-                        || OBJECT_WRAPPER_KEY_CAMEL_CASE.equals(name)) {
+                } else if (OBJECT_WRAPPER_KEY.equals(name)) {
                     if (DEFAULT_VALUE.equalsIgnoreCase(value)) {
                         this.unsetObjectWrapper();
                     } else if ("restricted".equalsIgnoreCase(value)) {
@@ -1911,24 +1776,18 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
         }
 
         /**
-         * Returns the valid {@link Configuration} setting names. Naturally, this includes the {@link MutableProcessingConfiguration} setting
-         * names too.
+         * Returns the valid {@link Configuration} setting names. Naturally, this includes the
+         * {@link MutableProcessingConfiguration} setting names too.
          *
-         * @param camelCase
-         *            If we want the setting names with camel case naming convention, or with snake case (legacy) naming
-         *            convention.
-         *
-         * @see MutableProcessingConfiguration#getSettingNames(boolean)
+         * @see MutableProcessingConfiguration#getSettingNames()
          */
-        public static Set<String> getSettingNames(boolean camelCase) {
-            return new _UnmodifiableCompositeSet<>(
-                    MutableParsingAndProcessingConfiguration.getSettingNames(camelCase),
-                    new _SortedArraySet<>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE));
+        public static Set<String> getSettingNames() {
+            return SETTING_NAMES;
         }
 
         @Override
         protected Version getRemovalVersionForUnknownSetting(String name) {
-            if (name.equals("strictSyntax") || name.equals("strict_syntax")) {
+            if (name.equals("strictSyntax") || name.equalsIgnoreCase("strict_syntax")) {
                 return Configuration.VERSION_3_0_0;
             }
             return super.getRemovalVersionForUnknownSetting(name);
@@ -1936,37 +1795,39 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
 
         @Override
         protected String getCorrectedNameForUnknownSetting(String name) {
-            if ("encoding".equals(name) || "default_encoding".equals(name) || "charset".equals(name)
-                    || "default_charset".equals(name)) {
-                // [2.4] Default might changes to camel-case
-                return SOURCE_ENCODING_KEY;
-            }
-            if ("defaultEncoding".equalsIgnoreCase(name) || "defaultCharset".equals(name)) {
-                return SOURCE_ENCODING_KEY_CAMEL_CASE;
-            }
-            if (name.equals("incompatible_enhancements")) {
-                return INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE;
-            }
-            if (name.equals("incompatibleEnhancements")) {
-                return INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE;
-            }
-            if (name.equals("cacheStorage")) {
-                return TEMPLATE_CACHE_STORAGE_KEY_CAMEL_CASE;
-            }
-            if (name.equals("cache_storage")) {
-                return TEMPLATE_CACHE_STORAGE_KEY_SNAKE_CASE;
-            }
-            if (name.equals("localizedLookup")) {
-                return LOCALIZED_TEMPLATE_LOOKUP_KEY_CAMEL_CASE;
-            }
-            if (name.equals("localized_lookup")) {
-                return LOCALIZED_TEMPLATE_LOOKUP_KEY_SNAKE_CASE;
-            }
-            if ("TemplateUpdateInterval".equalsIgnoreCase(name)) {
-                return TEMPLATE_UPDATE_DELAY_KEY;
+            switch(name.toLowerCase()) {
+                case "encoding":
+                case "default_encoding":
+                case "charset":
+                case "default_charset":
+                case "defaultencoding":
+                case "defaultcharset":
+                case "sourceencoding":
+                case "source_encoding":
+                    return SOURCE_ENCODING_KEY;
+                case "incompatible_enhancements":
+                case "incompatibleenhancements":
+                case "incompatibleimprovements":
+                case "incompatibleImprovements":
+                    return INCOMPATIBLE_IMPROVEMENTS_KEY;
+                case "cachestorage":
+                case "cache_storage":
+                case "templatecachestorage":
+                case "template_cache_storage":
+                    return TEMPLATE_CACHE_STORAGE_KEY;
+                case "localizedlookup":
+                case "localized_lookup":
+                case "localizedtemplatelookup":
+                case "localized_template_lookup":
+                    return LOCALIZED_TEMPLATE_LOOKUP_KEY;
+                case "templateupdateinterval":
+                case "templateupdatedelay":
+                case "template_update_delay":
+                    return TEMPLATE_UPDATE_DELAY_KEY;
+                default:
+                    return super.getCorrectedNameForUnknownSetting(name);
             }
 
-            return super.getCorrectedNameForUnknownSetting(name);
         }
 
         @Override
@@ -2503,13 +2364,13 @@ public final class Configuration implements TopLevelConfiguration, CustomStateSc
         }
 
         @Override
-        protected NamingConvention getDefaultNamingConvention() {
-            return NamingConvention.AUTO_DETECT;
+        public Version getIncompatibleImprovements() {
+            return incompatibleImprovements;
         }
 
         @Override
-        public Version getIncompatibleImprovements() {
-            return incompatibleImprovements;
+        public boolean isIncompatibleImprovementsSet() {
+            return true;
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/Environment.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/Environment.java b/freemarker-core/src/main/java/org/apache/freemarker/core/Environment.java
index fd9e35c..e0f6118 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/Environment.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/Environment.java
@@ -1789,7 +1789,7 @@ public final class Environment extends MutableProcessingConfiguration<Environmen
                 settingValue = getDateFormat();
                 break;
             case TemplateDateModel.DATETIME:
-                settingName = MutableProcessingConfiguration.DATETIME_FORMAT_KEY;
+                settingName = MutableProcessingConfiguration.DATE_TIME_FORMAT_KEY;
                 settingValue = getDateTimeFormat();
                 break;
             default:


[2/6] incubator-freemarker git commit: Removed namingConvention setting, and made directive names, built-in names, special variable names, and setting names, camel case. (Other naming conventions, if needed, are planned to be handled with custom dialects

Posted by dd...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/MutableParsingAndProcessingConfiguration.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/MutableParsingAndProcessingConfiguration.java b/freemarker-core/src/main/java/org/apache/freemarker/core/MutableParsingAndProcessingConfiguration.java
index 1c6aa5f..9339c62 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/MutableParsingAndProcessingConfiguration.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/MutableParsingAndProcessingConfiguration.java
@@ -36,99 +36,33 @@ public abstract class MutableParsingAndProcessingConfiguration<
         extends MutableProcessingConfiguration<SelfT>
         implements ParsingAndProcessingConfiguration {
 
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String OUTPUT_FORMAT_KEY_SNAKE_CASE = "output_format";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String OUTPUT_FORMAT_KEY = OUTPUT_FORMAT_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String OUTPUT_FORMAT_KEY_CAMEL_CASE = "outputFormat";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String SOURCE_ENCODING_KEY_SNAKE_CASE = "source_encoding";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String SOURCE_ENCODING_KEY = SOURCE_ENCODING_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String SOURCE_ENCODING_KEY_CAMEL_CASE = "sourceEncoding";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String WHITESPACE_STRIPPING_KEY_SNAKE_CASE = "whitespace_stripping";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String WHITESPACE_STRIPPING_KEY = WHITESPACE_STRIPPING_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String WHITESPACE_STRIPPING_KEY_CAMEL_CASE = "whitespaceStripping";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String AUTO_ESCAPING_POLICY_KEY_SNAKE_CASE = "auto_escaping_policy";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String AUTO_ESCAPING_POLICY_KEY = AUTO_ESCAPING_POLICY_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE = "autoEscapingPolicy";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE = "recognize_standard_file_extensions";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY
-            = RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE = "recognizeStandardFileExtensions";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String TEMPLATE_LANGUAGE_KEY_SNAKE_CASE = "template_language";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String TEMPLATE_LANGUAGE_KEY = TEMPLATE_LANGUAGE_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String TEMPLATE_LANGUAGE_KEY_CAMEL_CASE = "templateLanguage";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String TAG_SYNTAX_KEY_SNAKE_CASE = "tag_syntax";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String TAG_SYNTAX_KEY = TAG_SYNTAX_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String TAG_SYNTAX_KEY_CAMEL_CASE = "tagSyntax";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String NAMING_CONVENTION_KEY_SNAKE_CASE = "naming_convention";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String NAMING_CONVENTION_KEY = NAMING_CONVENTION_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String NAMING_CONVENTION_KEY_CAMEL_CASE = "namingConvention";
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String TAB_SIZE_KEY_SNAKE_CASE = "tab_size";
-    /** Alias to the {@code ..._SNAKE_CASE} variation. */
-    public static final String TAB_SIZE_KEY = TAB_SIZE_KEY_SNAKE_CASE;
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String TAB_SIZE_KEY_CAMEL_CASE = "tabSize";
-
-    private static final String[] SETTING_NAMES_SNAKE_CASE = new String[] {
-            // Must be sorted alphabetically!
-            AUTO_ESCAPING_POLICY_KEY_SNAKE_CASE,
-            NAMING_CONVENTION_KEY_SNAKE_CASE,
-            OUTPUT_FORMAT_KEY_SNAKE_CASE,
-            RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE,
-            SOURCE_ENCODING_KEY_SNAKE_CASE,
-            TAB_SIZE_KEY_SNAKE_CASE,
-            TAG_SYNTAX_KEY_SNAKE_CASE,
-            TEMPLATE_LANGUAGE_KEY_SNAKE_CASE,
-            WHITESPACE_STRIPPING_KEY_SNAKE_CASE
-    };
-
-    private static final String[] SETTING_NAMES_CAMEL_CASE = new String[] {
-            // Must be sorted alphabetically!
-            AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE,
-            NAMING_CONVENTION_KEY_CAMEL_CASE,
-            OUTPUT_FORMAT_KEY_CAMEL_CASE,
-            RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE,
-            SOURCE_ENCODING_KEY_CAMEL_CASE,
-            TAB_SIZE_KEY_CAMEL_CASE,
-            TAG_SYNTAX_KEY_CAMEL_CASE,
-            TEMPLATE_LANGUAGE_KEY_CAMEL_CASE,
-            WHITESPACE_STRIPPING_KEY_CAMEL_CASE
-    };
+    public static final String OUTPUT_FORMAT_KEY = "outputFormat";
+    public static final String SOURCE_ENCODING_KEY = "sourceEncoding";
+    public static final String WHITESPACE_STRIPPING_KEY = "whitespaceStripping";
+    public static final String AUTO_ESCAPING_POLICY_KEY = "autoEscapingPolicy";
+    public static final String RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY = "recognizeStandardFileExtensions";
+    public static final String TEMPLATE_LANGUAGE_KEY = "templateLanguage";
+    public static final String TAG_SYNTAX_KEY = "tagSyntax";
+    public static final String TAB_SIZE_KEY = "tabSize";
+    public static final String INCOMPATIBLE_IMPROVEMENTS_KEY = "incompatibleImprovements";
+
+    private static final _UnmodifiableCompositeSet<String> SETTING_NAMES = new _UnmodifiableCompositeSet<>(
+            MutableProcessingConfiguration.getSettingNames(),
+            new _SortedArraySet<>(
+                // Must be sorted alphabetically!
+                AUTO_ESCAPING_POLICY_KEY,
+                INCOMPATIBLE_IMPROVEMENTS_KEY,
+                OUTPUT_FORMAT_KEY,
+                RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY,
+                SOURCE_ENCODING_KEY,
+                TAB_SIZE_KEY,
+                TAG_SYNTAX_KEY,
+                TEMPLATE_LANGUAGE_KEY,
+                WHITESPACE_STRIPPING_KEY
+            ));
 
     private TemplateLanguage templateLanguage;
     private TagSyntax tagSyntax;
-    private NamingConvention namingConvention;
     private Boolean whitespaceStripping;
     private AutoEscapingPolicy autoEscapingPolicy;
     private Boolean recognizeStandardFileExtensions;
@@ -144,70 +78,63 @@ public abstract class MutableParsingAndProcessingConfiguration<
     public void setSetting(String name, String value) throws ConfigurationException {
         boolean nameUnhandled = false;
         try {
-            if (SOURCE_ENCODING_KEY_SNAKE_CASE.equals(name) || SOURCE_ENCODING_KEY_CAMEL_CASE.equals(name)) {
+            if (SOURCE_ENCODING_KEY.equals(name)) {
                 if (JVM_DEFAULT_VALUE.equalsIgnoreCase(value)) {
                     setSourceEncoding(Charset.defaultCharset());
                 } else {
                     setSourceEncoding(Charset.forName(value));
                 }
-            } else if (OUTPUT_FORMAT_KEY_SNAKE_CASE.equals(name) || OUTPUT_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (OUTPUT_FORMAT_KEY.equals(name)) {
                 if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
                     unsetOutputFormat();
                 } else {
                     setOutputFormat((OutputFormat) _ObjectBuilderSettingEvaluator.eval(
                             value, OutputFormat.class, true, _SettingEvaluationEnvironment.getCurrent()));
                 }
-            } else if (WHITESPACE_STRIPPING_KEY_SNAKE_CASE.equals(name)
-                    || WHITESPACE_STRIPPING_KEY_CAMEL_CASE.equals(name)) {
+            } else if (WHITESPACE_STRIPPING_KEY.equals(name)) {
                 setWhitespaceStripping(_StringUtil.getYesNo(value));
-            } else if (AUTO_ESCAPING_POLICY_KEY_SNAKE_CASE.equals(name) || AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE.equals(name)) {
-                if ("enable_if_default".equals(value) || "enableIfDefault".equals(value)) {
+            } else if (AUTO_ESCAPING_POLICY_KEY.equals(name)) {
+                if ("enableIfDefault".equals(value)) {
                     setAutoEscapingPolicy(AutoEscapingPolicy.ENABLE_IF_DEFAULT);
-                } else if ("enable_if_supported".equals(value) || "enableIfSupported".equals(value)) {
+                } else if ("enableIfSupported".equals(value)) {
                     setAutoEscapingPolicy(AutoEscapingPolicy.ENABLE_IF_SUPPORTED);
                 } else if ("disable".equals(value)) {
                     setAutoEscapingPolicy(AutoEscapingPolicy.DISABLE);
                 } else {
                     throw new InvalidSettingValueException( name, value,
+                            "enable_if_default".equals(value) ? "The correct value is: enableIfDefault" :
+                            "enable_if_supported".equals(value) ? "The correct value is: enableIfSupported" :
                             "No such predefined auto escaping policy name");
                 }
-            } else if (RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE.equals(name)
-                    || RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE.equals(name)) {
+            } else if (RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY.equals(name)) {
                 if (value.equalsIgnoreCase(DEFAULT_VALUE)) {
                     unsetRecognizeStandardFileExtensions();
                 } else {
                     setRecognizeStandardFileExtensions(_StringUtil.getYesNo(value));
                 }
-            } else if (TEMPLATE_LANGUAGE_KEY_SNAKE_CASE.equals(name) || TEMPLATE_LANGUAGE_KEY_CAMEL_CASE.equals(name)) {
+            } else if (TEMPLATE_LANGUAGE_KEY.equals(name)) {
                 if ("FTL".equals(value)) {
                     setTemplateLanguage(TemplateLanguage.FTL);
-                } else if ("static_text".equals(value) || "staticText".equals(value)) {
+                } else if ("staticText".equals(value)) {
                     setTemplateLanguage(TemplateLanguage.STATIC_TEXT);
                 } else {
                     throw new InvalidSettingValueException(name, value, "Unsupported template language name");
                 }
-            } else if (TAG_SYNTAX_KEY_SNAKE_CASE.equals(name) || TAG_SYNTAX_KEY_CAMEL_CASE.equals(name)) {
-                if ("auto_detect".equals(value) || "autoDetect".equals(value)) {
+            } else if (TAG_SYNTAX_KEY.equals(name)) {
+                if ("autoDetect".equals(value)) {
                     setTagSyntax(TagSyntax.AUTO_DETECT);
-                } else if ("angle_bracket".equals(value) || "angleBracket".equals(value)) {
+                } else if ("angleBracket".equals(value)) {
                     setTagSyntax(TagSyntax.ANGLE_BRACKET);
-                } else if ("square_bracket".equals(value) || "squareBracket".equals(value)) {
+                } else if ("squareBracket".equals(value)) {
                     setTagSyntax(TagSyntax.SQUARE_BRACKET);
                 } else {
-                    throw new InvalidSettingValueException(name, value, "No such predefined tag syntax name");
-                }
-            } else if (NAMING_CONVENTION_KEY_SNAKE_CASE.equals(name) || NAMING_CONVENTION_KEY_CAMEL_CASE.equals(name)) {
-                if ("auto_detect".equals(value) || "autoDetect".equals(value)) {
-                    setNamingConvention(NamingConvention.AUTO_DETECT);
-                } else if ("legacy".equals(value)) {
-                    setNamingConvention(NamingConvention.LEGACY);
-                } else if ("camel_case".equals(value) || "camelCase".equals(value)) {
-                    setNamingConvention(NamingConvention.CAMEL_CASE);
-                } else {
                     throw new InvalidSettingValueException(name, value,
-                            "No such predefined naming convention name.");
+                            "auto_detect".equals(value) ? "The correct value is: autoDetect" :
+                            "angle_bracket".equals(value) ? "The correct value is: angleBracket" :
+                            "square_bracket".equals(value) ? "The correct value is: squareBracket" :
+                            "No such predefined tag syntax name");
                 }
-            } else if (TAB_SIZE_KEY_SNAKE_CASE.equals(name) || TAB_SIZE_KEY_CAMEL_CASE.equals(name)) {
+            } else if (TAB_SIZE_KEY.equals(name)) {
                 setTabSize(Integer.parseInt(value));
             } else {
                 nameUnhandled = true;
@@ -222,10 +149,16 @@ public abstract class MutableParsingAndProcessingConfiguration<
         }
     }
 
-    public static Set<String> getSettingNames(boolean camelCase) {
-        return new _UnmodifiableCompositeSet<>(
-                MutableProcessingConfiguration.getSettingNames(camelCase),
-                new _SortedArraySet<>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE));
+    @Override
+    protected Version getRemovalVersionForUnknownSetting(String name) {
+        if (name.equals("namingConvention") || name.equalsIgnoreCase("naming_convention")) {
+            return Configuration.VERSION_3_0_0;
+        }
+        return super.getRemovalVersionForUnknownSetting(name);
+    }
+
+    public static Set<String> getSettingNames() {
+        return SETTING_NAMES;
     }
 
     /**
@@ -312,56 +245,6 @@ public abstract class MutableParsingAndProcessingConfiguration<
     }
 
     /**
-     * Setter pair of {@link #getNamingConvention()}.
-     *
-     * @param namingConvention
-     *         Can't be {@code null}
-     */
-    public void setNamingConvention(NamingConvention namingConvention) {
-        _NullArgumentException.check("namingConvention", namingConvention);
-        this.namingConvention = namingConvention;
-    }
-
-    /**
-     * Fluent API equivalent of {@link #setNamingConvention(NamingConvention)}
-     */
-    public SelfT namingConvention(NamingConvention namingConvention) {
-        setNamingConvention(namingConvention);
-        return self();
-    }
-
-    /**
-     * Resets the setting value as if it was never set (but it doesn't affect the value inherited from another
-     * {@link ParsingConfiguration}).
-     */
-    public void unsetNamingConvention() {
-        this.namingConvention = null;
-    }
-
-    /**
-     * The getter pair of {@link #setNamingConvention(NamingConvention)}.
-     */
-    @Override
-    public NamingConvention getNamingConvention() {
-         return isNamingConventionSet() ? namingConvention
-                : getDefaultNamingConvention();
-    }
-
-    /**
-     * Returns the value the getter method returns when the setting is not set, possibly by inheriting the setting value
-     * from another {@link ParsingConfiguration}, or throws {@link CoreSettingValueNotSetException}.
-     */
-    protected abstract NamingConvention getDefaultNamingConvention();
-
-    /**
-     * Tells if this setting is set directly in this object or its value is inherited from the parent parsing configuration..
-     */
-    @Override
-    public boolean isNamingConventionSet() {
-        return namingConvention != null;
-    }
-
-    /**
      * Setter pair of {@link ParsingConfiguration#getWhitespaceStripping()}.
      */
     public void setWhitespaceStripping(boolean whitespaceStripping) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/MutableProcessingConfiguration.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/MutableProcessingConfiguration.java b/freemarker-core/src/main/java/org/apache/freemarker/core/MutableProcessingConfiguration.java
index 07ee06e..d119bbc 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/MutableProcessingConfiguration.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/MutableProcessingConfiguration.java
@@ -81,221 +81,57 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
     public static final String DEFAULT_VALUE = "default";
     public static final String JVM_DEFAULT_VALUE = "JVM default";
     
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String LOCALE_KEY_SNAKE_CASE = "locale";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String LOCALE_KEY_CAMEL_CASE = "locale";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String LOCALE_KEY = LOCALE_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String NUMBER_FORMAT_KEY_SNAKE_CASE = "number_format";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String NUMBER_FORMAT_KEY_CAMEL_CASE = "numberFormat";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String NUMBER_FORMAT_KEY = NUMBER_FORMAT_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String CUSTOM_NUMBER_FORMATS_KEY_SNAKE_CASE = "custom_number_formats";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String CUSTOM_NUMBER_FORMATS_KEY_CAMEL_CASE = "customNumberFormats";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String CUSTOM_NUMBER_FORMATS_KEY = CUSTOM_NUMBER_FORMATS_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String TIME_FORMAT_KEY_SNAKE_CASE = "time_format";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String TIME_FORMAT_KEY_CAMEL_CASE = "timeFormat";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String TIME_FORMAT_KEY = TIME_FORMAT_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String DATE_FORMAT_KEY_SNAKE_CASE = "date_format";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String DATE_FORMAT_KEY_CAMEL_CASE = "dateFormat";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String DATE_FORMAT_KEY = DATE_FORMAT_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String CUSTOM_DATE_FORMATS_KEY_SNAKE_CASE = "custom_date_formats";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String CUSTOM_DATE_FORMATS_KEY_CAMEL_CASE = "customDateFormats";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String CUSTOM_DATE_FORMATS_KEY = CUSTOM_DATE_FORMATS_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String DATETIME_FORMAT_KEY_SNAKE_CASE = "datetime_format";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String DATETIME_FORMAT_KEY_CAMEL_CASE = "datetimeFormat";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String DATETIME_FORMAT_KEY = DATETIME_FORMAT_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String TIME_ZONE_KEY_SNAKE_CASE = "time_zone";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String TIME_ZONE_KEY_CAMEL_CASE = "timeZone";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String TIME_ZONE_KEY = TIME_ZONE_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String SQL_DATE_AND_TIME_TIME_ZONE_KEY_SNAKE_CASE = "sql_date_and_time_time_zone";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String SQL_DATE_AND_TIME_TIME_ZONE_KEY_CAMEL_CASE = "sqlDateAndTimeTimeZone";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String SQL_DATE_AND_TIME_TIME_ZONE_KEY = SQL_DATE_AND_TIME_TIME_ZONE_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String TEMPLATE_EXCEPTION_HANDLER_KEY_SNAKE_CASE = "template_exception_handler";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String TEMPLATE_EXCEPTION_HANDLER_KEY_CAMEL_CASE = "templateExceptionHandler";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String TEMPLATE_EXCEPTION_HANDLER_KEY = TEMPLATE_EXCEPTION_HANDLER_KEY_SNAKE_CASE;
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String ATTEMPT_EXCEPTION_REPORTER_KEY_SNAKE_CASE = "attempt_exception_reporter";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String ATTEMPT_EXCEPTION_REPORTER_KEY_CAMEL_CASE = "attemptExceptionReporter";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String ATTEMPT_EXCEPTION_REPORTER_KEY = ATTEMPT_EXCEPTION_REPORTER_KEY_SNAKE_CASE;
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String ARITHMETIC_ENGINE_KEY_SNAKE_CASE = "arithmetic_engine";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String ARITHMETIC_ENGINE_KEY_CAMEL_CASE = "arithmeticEngine";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String ARITHMETIC_ENGINE_KEY = ARITHMETIC_ENGINE_KEY_SNAKE_CASE;
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String BOOLEAN_FORMAT_KEY_SNAKE_CASE = "boolean_format";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String BOOLEAN_FORMAT_KEY_CAMEL_CASE = "booleanFormat";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String BOOLEAN_FORMAT_KEY = BOOLEAN_FORMAT_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String OUTPUT_ENCODING_KEY_SNAKE_CASE = "output_encoding";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String OUTPUT_ENCODING_KEY_CAMEL_CASE = "outputEncoding";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String OUTPUT_ENCODING_KEY = OUTPUT_ENCODING_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String URL_ESCAPING_CHARSET_KEY_SNAKE_CASE = "url_escaping_charset";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String URL_ESCAPING_CHARSET_KEY_CAMEL_CASE = "urlEscapingCharset";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String URL_ESCAPING_CHARSET_KEY = URL_ESCAPING_CHARSET_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String AUTO_FLUSH_KEY_SNAKE_CASE = "auto_flush";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String AUTO_FLUSH_KEY_CAMEL_CASE = "autoFlush";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String AUTO_FLUSH_KEY = AUTO_FLUSH_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String NEW_BUILTIN_CLASS_RESOLVER_KEY_SNAKE_CASE = "new_builtin_class_resolver";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String NEW_BUILTIN_CLASS_RESOLVER_KEY_CAMEL_CASE = "newBuiltinClassResolver";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String NEW_BUILTIN_CLASS_RESOLVER_KEY = NEW_BUILTIN_CLASS_RESOLVER_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String SHOW_ERROR_TIPS_KEY_SNAKE_CASE = "show_error_tips";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String SHOW_ERROR_TIPS_KEY_CAMEL_CASE = "showErrorTips";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String SHOW_ERROR_TIPS_KEY = SHOW_ERROR_TIPS_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String API_BUILTIN_ENABLED_KEY_SNAKE_CASE = "api_builtin_enabled";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String API_BUILTIN_ENABLED_KEY_CAMEL_CASE = "apiBuiltinEnabled";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String API_BUILTIN_ENABLED_KEY = API_BUILTIN_ENABLED_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String LAZY_IMPORTS_KEY_SNAKE_CASE = "lazy_imports";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String LAZY_IMPORTS_KEY_CAMEL_CASE = "lazyImports";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String LAZY_IMPORTS_KEY = LAZY_IMPORTS_KEY_SNAKE_CASE;
-
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String LAZY_AUTO_IMPORTS_KEY_SNAKE_CASE = "lazy_auto_imports";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String LAZY_AUTO_IMPORTS_KEY_CAMEL_CASE = "lazyAutoImports";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String LAZY_AUTO_IMPORTS_KEY = LAZY_AUTO_IMPORTS_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String AUTO_IMPORT_KEY_SNAKE_CASE = "auto_import";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String AUTO_IMPORT_KEY_CAMEL_CASE = "autoImport";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String AUTO_IMPORT_KEY = AUTO_IMPORT_KEY_SNAKE_CASE;
-    
-    /** Legacy, snake case ({@code like_this}) variation of the setting name. */
-    public static final String AUTO_INCLUDE_KEY_SNAKE_CASE = "auto_include";
-    /** Modern, camel case ({@code likeThis}) variation of the setting name. */
-    public static final String AUTO_INCLUDE_KEY_CAMEL_CASE = "autoInclude";
-    /** Alias to the {@code ..._SNAKE_CASE} variation due to backward compatibility constraints. */
-    public static final String AUTO_INCLUDE_KEY = AUTO_INCLUDE_KEY_SNAKE_CASE;
-    
-    private static final String[] SETTING_NAMES_SNAKE_CASE = new String[] {
+    public static final String LOCALE_KEY = "locale";
+    public static final String NUMBER_FORMAT_KEY = "numberFormat";
+    public static final String CUSTOM_NUMBER_FORMATS_KEY = "customNumberFormats";
+    public static final String TIME_FORMAT_KEY = "timeFormat";
+    public static final String DATE_FORMAT_KEY = "dateFormat";
+    public static final String DATE_TIME_FORMAT_KEY = "dateTimeFormat";
+    public static final String CUSTOM_DATE_FORMATS_KEY = "customDateFormats";
+    public static final String TIME_ZONE_KEY = "timeZone";
+    public static final String SQL_DATE_AND_TIME_TIME_ZONE_KEY = "sqlDateAndTimeTimeZone";
+    public static final String TEMPLATE_EXCEPTION_HANDLER_KEY = "templateExceptionHandler";
+    public static final String ATTEMPT_EXCEPTION_REPORTER_KEY = "attemptExceptionReporter";
+    public static final String ARITHMETIC_ENGINE_KEY = "arithmeticEngine";
+    public static final String BOOLEAN_FORMAT_KEY = "booleanFormat";
+    public static final String OUTPUT_ENCODING_KEY = "outputEncoding";
+    public static final String URL_ESCAPING_CHARSET_KEY = "urlEscapingCharset";
+    public static final String AUTO_FLUSH_KEY = "autoFlush";
+    public static final String NEW_BUILTIN_CLASS_RESOLVER_KEY = "newBuiltinClassResolver";
+    public static final String SHOW_ERROR_TIPS_KEY = "showErrorTips";
+    public static final String API_BUILTIN_ENABLED_KEY = "apiBuiltinEnabled";
+    public static final String LAZY_IMPORTS_KEY = "lazyImports";
+    public static final String LAZY_AUTO_IMPORTS_KEY = "lazyAutoImports";
+    public static final String AUTO_IMPORTS_KEY = "autoImports";
+    public static final String AUTO_INCLUDES_KEY = "autoIncludes";
+
+    private static final Set<String> SETTING_NAMES = new _SortedArraySet<>(
         // Must be sorted alphabetically!
-        API_BUILTIN_ENABLED_KEY_SNAKE_CASE,
-        ARITHMETIC_ENGINE_KEY_SNAKE_CASE,
-        ATTEMPT_EXCEPTION_REPORTER_KEY_SNAKE_CASE,
-        AUTO_FLUSH_KEY_SNAKE_CASE,
-        AUTO_IMPORT_KEY_SNAKE_CASE,
-        AUTO_INCLUDE_KEY_SNAKE_CASE,
-        BOOLEAN_FORMAT_KEY_SNAKE_CASE,
-        CUSTOM_DATE_FORMATS_KEY_SNAKE_CASE,
-        CUSTOM_NUMBER_FORMATS_KEY_SNAKE_CASE,
-        DATE_FORMAT_KEY_SNAKE_CASE,
-        DATETIME_FORMAT_KEY_SNAKE_CASE,
-        LAZY_AUTO_IMPORTS_KEY_SNAKE_CASE,
-        LAZY_IMPORTS_KEY_SNAKE_CASE,
-        LOCALE_KEY_SNAKE_CASE,
-        NEW_BUILTIN_CLASS_RESOLVER_KEY_SNAKE_CASE,
-        NUMBER_FORMAT_KEY_SNAKE_CASE,
-        OUTPUT_ENCODING_KEY_SNAKE_CASE,
-        SHOW_ERROR_TIPS_KEY_SNAKE_CASE,
-        SQL_DATE_AND_TIME_TIME_ZONE_KEY_SNAKE_CASE,
-        TEMPLATE_EXCEPTION_HANDLER_KEY_SNAKE_CASE,
-        TIME_FORMAT_KEY_SNAKE_CASE,
-        TIME_ZONE_KEY_SNAKE_CASE,
-        URL_ESCAPING_CHARSET_KEY_SNAKE_CASE
-    };
+        API_BUILTIN_ENABLED_KEY,
+        ARITHMETIC_ENGINE_KEY,
+        ATTEMPT_EXCEPTION_REPORTER_KEY,
+        AUTO_FLUSH_KEY,
+        AUTO_IMPORTS_KEY,
+        AUTO_INCLUDES_KEY,
+        BOOLEAN_FORMAT_KEY,
+        CUSTOM_DATE_FORMATS_KEY,
+        CUSTOM_NUMBER_FORMATS_KEY,
+        DATE_FORMAT_KEY,
+        DATE_TIME_FORMAT_KEY,
+        LAZY_AUTO_IMPORTS_KEY,
+        LAZY_IMPORTS_KEY,
+        LOCALE_KEY,
+        NEW_BUILTIN_CLASS_RESOLVER_KEY,
+        NUMBER_FORMAT_KEY,
+        OUTPUT_ENCODING_KEY,
+        SHOW_ERROR_TIPS_KEY,
+        SQL_DATE_AND_TIME_TIME_ZONE_KEY,
+        TEMPLATE_EXCEPTION_HANDLER_KEY,
+        TIME_FORMAT_KEY,
+        TIME_ZONE_KEY,
+        URL_ESCAPING_CHARSET_KEY
+    );
     
-    private static final String[] SETTING_NAMES_CAMEL_CASE = new String[] {
-        // Must be sorted alphabetically!
-        API_BUILTIN_ENABLED_KEY_CAMEL_CASE,
-        ARITHMETIC_ENGINE_KEY_CAMEL_CASE,
-        ATTEMPT_EXCEPTION_REPORTER_KEY_CAMEL_CASE,
-        AUTO_FLUSH_KEY_CAMEL_CASE,
-        AUTO_IMPORT_KEY_CAMEL_CASE,
-        AUTO_INCLUDE_KEY_CAMEL_CASE,
-        BOOLEAN_FORMAT_KEY_CAMEL_CASE,
-        CUSTOM_DATE_FORMATS_KEY_CAMEL_CASE,
-        CUSTOM_NUMBER_FORMATS_KEY_CAMEL_CASE,
-        DATE_FORMAT_KEY_CAMEL_CASE,
-        DATETIME_FORMAT_KEY_CAMEL_CASE,
-        LAZY_AUTO_IMPORTS_KEY_CAMEL_CASE,
-        LAZY_IMPORTS_KEY_CAMEL_CASE,
-        LOCALE_KEY_CAMEL_CASE,
-        NEW_BUILTIN_CLASS_RESOLVER_KEY_CAMEL_CASE,
-        NUMBER_FORMAT_KEY_CAMEL_CASE,
-        OUTPUT_ENCODING_KEY_CAMEL_CASE,
-        SHOW_ERROR_TIPS_KEY_CAMEL_CASE,
-        SQL_DATE_AND_TIME_TIME_ZONE_KEY_CAMEL_CASE,
-        TEMPLATE_EXCEPTION_HANDLER_KEY_CAMEL_CASE,
-        TIME_FORMAT_KEY_CAMEL_CASE,
-        TIME_ZONE_KEY_CAMEL_CASE,
-        URL_ESCAPING_CHARSET_KEY_CAMEL_CASE
-    };
-
     private Locale locale;
     private String numberFormat;
     private String timeFormat;
@@ -1420,8 +1256,8 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
         return autoIncludes != null;
     }
     
-    private static final String ALLOWED_CLASSES = "allowed_classes";
-    private static final String TRUSTED_TEMPLATES = "trusted_templates";
+    private static final String ALLOWED_CLASSES = "allowedClasses";
+    private static final String TRUSTED_TEMPLATES = "trustedTemplates";
     
     /**
      * Sets a FreeMarker setting by a name and string value. If you can configure FreeMarker directly with Java (or
@@ -1431,7 +1267,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      * overview of the settings available.
      * 
      * <p>Note: As of FreeMarker 2.3.23, setting names can be written in camel case too. For example, instead of
-     * {@code date_format} you can also use {@code dateFormat}. It's likely that camel case will become to the
+     * {@code dateFormat} you can also use {@code dateFormat}. It's likely that camel case will become to the
      * recommended convention in the future.
      * 
      * <p>The list of settings commonly supported in all {@link MutableProcessingConfiguration} subclasses:
@@ -1441,17 +1277,17 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       <br>String value: local codes with the usual format in Java, such as {@code "en_US"}, or
      *       "JVM default" (ignoring case) to use the default locale of the Java environment.
      *
-     *   <li><p>{@code "custom_number_formats"}: See {@link #setCustomNumberFormats(Map)}.
+     *   <li><p>{@code "customNumberFormat"}: See {@link #setCustomNumberFormats(Map)}.
      *   <br>String value: Interpreted as an <a href="#fm_obe">object builder expression</a>.
      *   <br>Example: <code>{ "hex": com.example.HexTemplateNumberFormatFactory,
      *   "gps": com.example.GPSTemplateNumberFormatFactory }</code>
      *
-     *   <li><p>{@code "custom_date_formats"}: See {@link #setCustomDateFormats(Map)}.
+     *   <li><p>{@code "customDateFormat"}: See {@link #setCustomDateFormats(Map)}.
      *   <br>String value: Interpreted as an <a href="#fm_obe">object builder expression</a>.
      *   <br>Example: <code>{ "trade": com.example.TradeTemplateDateFormatFactory,
      *   "log": com.example.LogTemplateDateFormatFactory }</code>
      *       
-     *   <li><p>{@code "template_exception_handler"}:
+     *   <li><p>{@code "templateExceptionHandler"}:
      *       See {@link #setTemplateExceptionHandler(TemplateExceptionHandler)}.
      *       <br>String value: If the value contains dot, then it's interpreted as an <a href="#fm_obe">object builder
      *       expression</a>.
@@ -1462,7 +1298,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       {@code "ignore"} (means {@link TemplateExceptionHandler#IGNORE}), or
      *       {@code "default"} (only allowed for {@link Configuration} instances) for the default.
      *
-     *   <li><p>{@code "attempt_exception_reporter"}:
+     *   <li><p>{@code "attemptExceptionReporter"}:
      *       See {@link #setAttemptExceptionReporter(AttemptExceptionReporter)}.
      *       <br>String value: If the value contains dot, then it's interpreted as an <a href="#fm_obe">object builder
      *       expression</a>.
@@ -1471,7 +1307,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       {@code "logWarn"} (means {@link AttemptExceptionReporter#LOG_WARN}), or
      *       {@code "default"} (only allowed for {@link Configuration} instances) for the default value.
      *       
-     *   <li><p>{@code "arithmetic_engine"}:
+     *   <li><p>{@code "arithmeticEngine"}:
      *       See {@link #setArithmeticEngine(ArithmeticEngine)}.  
      *       <br>String value: If the value contains dot, then it's interpreted as an <a href="#fm_obe">object builder
      *       expression</a>.
@@ -1479,7 +1315,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       then it must be one of these special values (case insensitive):
      *       {@code "bigdecimal"}, {@code "conservative"}.
      *       
-     *   <li><p>{@code "object_wrapper"}:
+     *   <li><p>{@code "objectWrapper"}:
      *       See {@link Configuration.Builder#setObjectWrapper(ObjectWrapper)}.
      *       <br>String value: If the value contains dot, then it's interpreted as an <a href="#fm_obe">object builder
      *       expression</a>, with the addition that {@link DefaultObjectWrapper}, {@link DefaultObjectWrapper} and
@@ -1489,23 +1325,23 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       <br>It also accepts the special value (case insensitive) {@code "default"}.
      *       <br>It also accepts the special value (case insensitive) {@code "default"}.
      *
-     *   <li><p>{@code "number_format"}: See {@link #setNumberFormat(String)}.
+     *   <li><p>{@code "numberFormat"}: See {@link #setNumberFormat(String)}.
      *   
-     *   <li><p>{@code "boolean_format"}: See {@link #setBooleanFormat(String)} .
+     *   <li><p>{@code "booleanFormat"}: See {@link #setBooleanFormat(String)} .
      *   
-     *   <li><p>{@code "date_format", "time_format", "datetime_format"}:
+     *   <li><p>{@code "dateFormat", "dateFormat", "dateTimeFormat"}:
      *       See {@link #setDateFormat(String)}, {@link #setTimeFormat(String)}, {@link #setDateTimeFormat(String)}. 
      *        
-     *   <li><p>{@code "time_zone"}:
+     *   <li><p>{@code "timeZone"}:
      *       See {@link #setTimeZone(TimeZone)}.
      *       <br>String value: With the format as {@link TimeZone#getTimeZone} defines it. Also, since 2.3.21
      *       {@code "JVM default"} can be used that will be replaced with the actual JVM default time zone when
      *       {@link #setSetting(String, String)} is called.
      *       For example {@code "GMT-8:00"} or {@code "America/Los_Angeles"}
-     *       <br>If you set this setting, consider setting {@code sql_date_and_time_time_zone}
+     *       <br>If you set this setting, consider setting {@code sqlDateAndTimeTimeZone}
      *       too (see below)! 
      *       
-     *   <li><p>{@code sql_date_and_time_time_zone}:
+     *   <li><p>{@code sqlDateAndTimeTimeZone}:
      *       See {@link #setSQLDateAndTimeTimeZone(TimeZone)}.
      *       Since 2.3.21.
      *       <br>String value: With the format as {@link TimeZone#getTimeZone} defines it. Also, {@code "JVM default"}
@@ -1513,61 +1349,61 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       {@link #setSetting(String, String)} is called. Also {@code "null"} can be used, which has the same effect
      *       as {@link #setSQLDateAndTimeTimeZone(TimeZone) setSQLDateAndTimeTimeZone(null)}.
      *       
-     *   <li><p>{@code "output_encoding"}:
+     *   <li><p>{@code "outputEncoding"}:
      *       See {@link #setOutputEncoding(Charset)}.
      *       
-     *   <li><p>{@code "url_escaping_charset"}:
+     *   <li><p>{@code "urlEscapingCharset"}:
      *       See {@link #setURLEscapingCharset(Charset)}.
      *       
-     *   <li><p>{@code "auto_flush"}:
+     *   <li><p>{@code "autoFlush"}:
      *       See {@link #setAutoFlush(boolean)}.
      *       Since 2.3.17.
      *       <br>String value: {@code "true"}, {@code "false"}, {@code "y"},  etc.
      *       
-     *   <li><p>{@code "auto_import"}:
+     *   <li><p>{@code "autoImports"}:
      *       See {@link Configuration#getAutoImports()}
      *       <br>String value is something like:
      *       <br>{@code /lib/form.ftl as f, /lib/widget as w, "/lib/odd name.ftl" as odd}
      *       
-     *   <li><p>{@code "auto_include"}: Sets the list of auto-includes.
+     *   <li><p>{@code "autoInclude"}: Sets the list of auto-includes.
      *       See {@link Configuration#getAutoIncludes()}
      *       <br>String value is something like:
      *       <br>{@code /include/common.ftl, "/include/evil name.ftl"}
      *       
-     *   <li><p>{@code "lazy_auto_imports"}:
+     *   <li><p>{@code "lazyAutoImports"}:
      *       See {@link Configuration#getLazyAutoImports()}.
      *       <br>String value: {@code "true"}, {@code "false"} (also the equivalents: {@code "yes"}, {@code "no"},
      *       {@code "t"}, {@code "f"}, {@code "y"}, {@code "n"}), case insensitive. Also can be {@code "null"}.
 
-     *   <li><p>{@code "lazy_imports"}:
+     *   <li><p>{@code "lazyImports"}:
      *       See {@link Configuration#getLazyImports()}.
      *       <br>String value: {@code "true"}, {@code "false"} (also the equivalents: {@code "yes"}, {@code "no"},
      *       {@code "t"}, {@code "f"}, {@code "y"}, {@code "n"}), case insensitive.
      *       
-     *   <li><p>{@code "new_builtin_class_resolver"}:
+     *   <li><p>{@code "newBuiltinClassResolver"}:
      *       See {@link #setNewBuiltinClassResolver(TemplateClassResolver)}.
      *       Since 2.3.17.
      *       The value must be one of these (ignore the quotation marks):
      *       <ol>
      *         <li><p>{@code "unrestricted"}:
      *             Use {@link TemplateClassResolver#UNRESTRICTED}
-     *         <li><p>{@code "allow_nothing"}:
+     *         <li><p>{@code "allowNothing"}:
      *             Use {@link TemplateClassResolver#ALLOW_NOTHING}
      *         <li><p>Something that contains colon will use
      *             {@link OptInTemplateClassResolver} and is expected to
      *             store comma separated values (possibly quoted) segmented
-     *             with {@code "allowed_classes:"} and/or
-     *             {@code "trusted_templates:"}. Examples of valid values:
+     *             with {@code "allowedClasses:"} and/or
+     *             {@code "trustedTemplates:"}. Examples of valid values:
      *             
      *             <table style="width: auto; border-collapse: collapse" border="1"
-     *                  summary="trusted_template value examples">
+     *                  summary="trustedTemplate value examples">
      *               <tr>
      *                 <th>Setting value
      *                 <th>Meaning
      *               <tr>
      *                 <td>
-     *                   {@code allowed_classes: com.example.C1, com.example.C2,
-     *                   trusted_templates: lib/*, safe.ftl}                 
+     *                   {@code allowedClasses: com.example.C1, com.example.C2,
+     *                   trustedTemplates: lib/*, safe.ftl}
      *                 <td>
      *                   Only allow instantiating the {@code com.example.C1} and
      *                   {@code com.example.C2} classes. But, allow templates
@@ -1578,13 +1414,13 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *                   that {@link TemplateClassResolver#UNRESTRICTED} allows.
      *               <tr>
      *                 <td>
-     *                   {@code allowed_classes: com.example.C1, com.example.C2}
+     *                   {@code allowedClasses: com.example.C1, com.example.C2}
      *                 <td>Only allow instantiating the {@code com.example.C1} and
      *                   {@code com.example.C2} classes. There are no
      *                   trusted templates.
      *               <tr>
      *                 <td>
-                         {@code trusted_templates: lib/*, safe.ftl}                 
+                         {@code trustedTemplates: lib/*, safe.ftl}
      *                 <td>
      *                   Do not allow instantiating any classes, except in
      *                   templates inside {@code lib/} or in template 
@@ -1598,12 +1434,12 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       </ol>
      *       Note that the {@code safer} option was removed in FreeMarker 3.0.0, as it has become equivalent with
      *       {@code "unrestricted"}, as the classes it has blocked were removed from FreeMarker.
-     *   <li><p>{@code "show_error_tips"}:
+     *   <li><p>{@code "showErrorTips"}:
      *       See {@link #setShowErrorTips(boolean)}.
      *       Since 2.3.21.
      *       <br>String value: {@code "true"}, {@code "false"}, {@code "y"},  etc.
      *       
-     *   <li><p>{@code api_builtin_enabled}:
+     *   <li><p>{@code apiBuiltinEnabled}:
      *       See {@link #setAPIBuiltinEnabled(boolean)}.
      *       Since 2.3.22.
      *       <br>String value: {@code "true"}, {@code "false"}, {@code "y"},  etc.
@@ -1614,9 +1450,9 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      * <ul>
      *   <li><p>{@code "auto_escaping"}:
      *       See {@link Configuration#getAutoEscapingPolicy()}
-     *       <br>String value: {@code "enable_if_default"} or {@code "enableIfDefault"} for
+     *       <br>String value: {@code "enableIfDefault"} or {@code "enableIfDefault"} for
      *       {@link AutoEscapingPolicy#ENABLE_IF_DEFAULT},
-     *       {@code "enable_if_supported"} or {@code "enableIfSupported"} for
+     *       {@code "enableIfDefault"} or {@code "enableIfSupported"} for
      *       {@link AutoEscapingPolicy#ENABLE_IF_SUPPORTED}
      *       {@code "disable"} for {@link AutoEscapingPolicy#DISABLE}.
      *       
@@ -1626,29 +1462,29 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       <br>As the default value is the system default, which can change
      *       from one server to another, <b>you should always set this!</b>
      *       
-     *   <li><p>{@code "localized_template_lookup"}:
+     *   <li><p>{@code "localizedTemplateLookup"}:
      *       See {@link Configuration#getLocalizedTemplateLookup()}.
      *       <br>String value: {@code "true"}, {@code "false"} (also the equivalents: {@code "yes"}, {@code "no"},
      *       {@code "t"}, {@code "f"}, {@code "y"}, {@code "n"}).
      *       ASTDirCase insensitive.
      *       
-     *   <li><p>{@code "output_format"}:
+     *   <li><p>{@code "outputFormat"}:
      *       See {@link ParsingConfiguration#getOutputFormat()}.
      *       <br>String value: {@code "default"} (case insensitive) for the default, or an
      *       <a href="#fm_obe">object builder expression</a> that gives an {@link OutputFormat}, for example
      *       {@code HTMLOutputFormat} or {@code XMLOutputFormat}.
      *       
-     *   <li><p>{@code "registered_custom_output_formats"}:
+     *   <li><p>{@code "registeredCustomOutputFormats"}:
      *       See {@link Configuration#getRegisteredCustomOutputFormats()}.
      *       <br>String value: an <a href="#fm_obe">object builder expression</a> that gives a {@link List} of
      *       {@link OutputFormat}-s.
      *       Example: {@code [com.example.MyOutputFormat(), com.example.MyOtherOutputFormat()]}
      *       
-     *   <li><p>{@code "whitespace_stripping"}:
+     *   <li><p>{@code "whitespaceStripping"}:
      *       See {@link ParsingConfiguration#getWhitespaceStripping()}.
      *       <br>String value: {@code "true"}, {@code "false"}, {@code yes}, etc.
      *       
-     *   <li><p>{@code "template_cache_storage"}:
+     *   <li><p>{@code "templateCacheStorage"}:
      *       See {@link Configuration#getTemplateCacheStorage()}.
      *       <br>String value: If the value contains dot, then it's interpreted as an <a href="#fm_obe">object builder
      *       expression</a>.
@@ -1657,7 +1493,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       maximum strong and soft sizes specified with the setting value. Examples
      *       of valid setting values:
      *       
-     *       <table style="width: auto; border-collapse: collapse" border="1" summary="template_cache_storage value
+     *       <table style="width: auto; border-collapse: collapse" border="1" summary="templateCacheStorage value
      *       examples">
      *         <tr><th>Setting value<th>max. strong size<th>max. soft size
      *         <tr><td>{@code "strong:50, soft:500"}<td>50<td>500
@@ -1671,7 +1507,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       <p>The value is not case sensitive. The order of <tt>soft</tt> and <tt>strong</tt>
      *       entries is not significant.
      *       
-     *   <li><p>{@code "template_update_delay"}:
+     *   <li><p>{@code "templateUpdateDelay"}:
      *       Template update delay in <b>seconds</b> (not in milliseconds) if no unit is specified; see
      *       {@link Configuration#getTemplateUpdateDelayMilliseconds()} for more.
      *       <br>String value: Valid positive integer, optionally followed by a time unit (recommended). The default
@@ -1679,41 +1515,36 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *       Supported units are: "s" (seconds), "ms" (milliseconds), "m" (minutes), "h" (hours). The whitespace between
      *       the unit and the number is optional. Units are only supported since 2.3.23.
      *       
-     *   <li><p>{@code "tag_syntax"}:
+     *   <li><p>{@code "tagSyntax"}:
      *       See {@link ParsingConfiguration#getTagSyntax()}.
      *       <br>String value: Must be one of
-     *       {@code "auto_detect"}, {@code "angle_bracket"}, and {@code "square_bracket"}. 
+     *       {@code "autoDetect"}, {@code "squareBracket"}, and {@code "squareBracket"}.
      *       
-     *   <li><p>{@code "naming_convention"}:
-     *       See {@link ParsingConfiguration#getNamingConvention()}.
-     *       <br>String value: Must be one of
-     *       {@code "auto_detect"}, {@code "legacy"}, and {@code "camel_case"}.
-     *       
-     *   <li><p>{@code "incompatible_improvements"}:
+     *   <li><p>{@code "incompatibleImprovements"}:
      *       See {@link Configuration#getIncompatibleImprovements()}.
      *       <br>String value: version number like {@code 2.3.20}.
      *       
-     *   <li><p>{@code "recognize_standard_file_extensions"}:
+     *   <li><p>{@code "recognizeStandardFileExtensions"}:
      *       See {@link Configuration#getRecognizeStandardFileExtensions()}.
      *       <br>String value: {@code "default"} (case insensitive) for the default, or {@code "true"}, {@code "false"},
      *       {@code yes}, etc.
      *       
-     *   <li><p>{@code "template_configurations"}:
+     *   <li><p>{@code "templateConfigurations"}:
      *       See: {@link Configuration#getTemplateConfigurations()}.
      *       <br>String value: Interpreted as an <a href="#fm_obe">object builder expression</a>,
      *       can be {@code null}.
      *       
-     *   <li><p>{@code "template_loader"}:
+     *   <li><p>{@code "templateLoader"}:
      *       See: {@link Configuration#getTemplateLoader()}.
      *       <br>String value: {@code "default"} (case insensitive) for the default, or else interpreted as an
      *       <a href="#fm_obe">object builder expression</a>. {@code "null"} is also allowed.
      *       
-     *   <li><p>{@code "template_lookup_strategy"}:
+     *   <li><p>{@code "templateLookupStrategy"}:
      *       See: {@link Configuration#getTemplateLookupStrategy()}.
      *       <br>String value: {@code "default"} (case insensitive) for the default, or else interpreted as an
      *       <a href="#fm_obe">object builder expression</a>.
      *       
-     *   <li><p>{@code "template_name_format"}:
+     *   <li><p>{@code "templateNameFormat"}:
      *       See: {@link Configuration#getTemplateNameFormat()}.
      *       <br>String value: {@code "default"} (case insensitive) for the default,
      *       {@link DefaultTemplateNameFormat#INSTANCE}.
@@ -1794,8 +1625,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      *     {@link AndMatcher}, {@link OrMatcher}, {@link NotMatcher}, {@link ConditionalTemplateConfigurationFactory},
      *     {@link MergingTemplateConfigurationFactory}, {@link FirstMatchTemplateConfigurationFactory},
      *     {@link HTMLOutputFormat}, {@link XMLOutputFormat}, {@link RTFOutputFormat}, {@link PlainTextOutputFormat},
-     *     {@link UndefinedOutputFormat}, {@link Configuration}, {@link TemplateLanguage}, {@link NamingConvention},
-     *     {@link TagSyntax}.
+     *     {@link UndefinedOutputFormat}, {@link Configuration}, {@link TemplateLanguage}, {@link TagSyntax}.
      *   </li>
      *   <li>
      *     <p>{@link TimeZone} objects can be created like {@code TimeZone("UTC")}, despite that there's no a such
@@ -1825,40 +1655,36 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
                 } else {
                     setLocale(_StringUtil.deduceLocale(value));
                 }
-            } else if (NUMBER_FORMAT_KEY_SNAKE_CASE.equals(name) || NUMBER_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (NUMBER_FORMAT_KEY.equals(name)) {
                 setNumberFormat(value);
-            } else if (CUSTOM_NUMBER_FORMATS_KEY_SNAKE_CASE.equals(name)
-                    || CUSTOM_NUMBER_FORMATS_KEY_CAMEL_CASE.equals(name)) {
+            } else if (CUSTOM_NUMBER_FORMATS_KEY.equals(name)) {
                 Map map = (Map) _ObjectBuilderSettingEvaluator.eval(
                                 value, Map.class, false, _SettingEvaluationEnvironment.getCurrent());
                 checkSettingValueItemsType("Map keys", String.class, map.keySet());
                 checkSettingValueItemsType("Map values", TemplateNumberFormatFactory.class, map.values());
                 setCustomNumberFormats(map);
-            } else if (TIME_FORMAT_KEY_SNAKE_CASE.equals(name) || TIME_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (TIME_FORMAT_KEY.equals(name)) {
                 setTimeFormat(value);
-            } else if (DATE_FORMAT_KEY_SNAKE_CASE.equals(name) || DATE_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (DATE_FORMAT_KEY.equals(name)) {
                 setDateFormat(value);
-            } else if (DATETIME_FORMAT_KEY_SNAKE_CASE.equals(name) || DATETIME_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (DATE_TIME_FORMAT_KEY.equals(name)) {
                 setDateTimeFormat(value);
-            } else if (CUSTOM_DATE_FORMATS_KEY_SNAKE_CASE.equals(name)
-                    || CUSTOM_DATE_FORMATS_KEY_CAMEL_CASE.equals(name)) {
+            } else if (CUSTOM_DATE_FORMATS_KEY.equals(name)) {
                 Map map = (Map) _ObjectBuilderSettingEvaluator.eval(
                                 value, Map.class, false, _SettingEvaluationEnvironment.getCurrent());
                 checkSettingValueItemsType("Map keys", String.class, map.keySet());
                 checkSettingValueItemsType("Map values", TemplateDateFormatFactory.class, map.values());
                 setCustomDateFormats(map);
-            } else if (TIME_ZONE_KEY_SNAKE_CASE.equals(name) || TIME_ZONE_KEY_CAMEL_CASE.equals(name)) {
+            } else if (TIME_ZONE_KEY.equals(name)) {
                 setTimeZone(parseTimeZoneSettingValue(value));
-            } else if (SQL_DATE_AND_TIME_TIME_ZONE_KEY_SNAKE_CASE.equals(name)
-                    || SQL_DATE_AND_TIME_TIME_ZONE_KEY_CAMEL_CASE.equals(name)) {
+            } else if (SQL_DATE_AND_TIME_TIME_ZONE_KEY.equals(name)) {
                 setSQLDateAndTimeTimeZone(value.equals("null") ? null : parseTimeZoneSettingValue(value));
-            } else if (TEMPLATE_EXCEPTION_HANDLER_KEY_SNAKE_CASE.equals(name)
-                    || TEMPLATE_EXCEPTION_HANDLER_KEY_CAMEL_CASE.equals(name)) {
+            } else if (TEMPLATE_EXCEPTION_HANDLER_KEY.equals(name)) {
                 if (value.indexOf('.') == -1) {
                     if ("debug".equalsIgnoreCase(value)) {
                         setTemplateExceptionHandler(
                                 TemplateExceptionHandler.DEBUG);
-                    } else if ("html_debug".equalsIgnoreCase(value) || "htmlDebug".equals(value)) {
+                    } else if ("htmlDebug".equals(value)) {
                         setTemplateExceptionHandler(
                                 TemplateExceptionHandler.HTML_DEBUG);
                     } else if ("ignore".equalsIgnoreCase(value)) {
@@ -1873,19 +1699,20 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
                     } else {
                         throw new InvalidSettingValueException(
                                 name, value,
-                                "No such predefined template exception handler name");
+                                value.equalsIgnoreCase("html_debug")
+                                        ? "The correct value would be: htmlDebug"
+                                        : "No such predefined template exception handler name");
                     }
                 } else {
                     setTemplateExceptionHandler((TemplateExceptionHandler) _ObjectBuilderSettingEvaluator.eval(
                             value, TemplateExceptionHandler.class, false, _SettingEvaluationEnvironment.getCurrent()));
                 }
-            } else if (ATTEMPT_EXCEPTION_REPORTER_KEY_SNAKE_CASE.equals(name)
-                    || ATTEMPT_EXCEPTION_REPORTER_KEY_CAMEL_CASE.equals(name)) {
+            } else if (ATTEMPT_EXCEPTION_REPORTER_KEY.equals(name)) {
                 if (value.indexOf('.') == -1) {
-                    if ("log_error".equalsIgnoreCase(value) || "logError".equals(value)) {
+                    if ("logError".equals(value)) {
                         setAttemptExceptionReporter(
                                 AttemptExceptionReporter.LOG_ERROR);
-                    } else if ("log_warn".equalsIgnoreCase(value) || "logWarn".equals(value)) {
+                    } else if ("logWarn".equals(value)) {
                         setAttemptExceptionReporter(
                                 AttemptExceptionReporter.LOG_WARN);
                     } else if (DEFAULT_VALUE.equalsIgnoreCase(value)
@@ -1894,13 +1721,17 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
                     } else {
                         throw new InvalidSettingValueException(
                                 name, value,
-                                "No such predefined template exception handler name");
+                                value.equalsIgnoreCase("log_error") ? "The correct value would be: "
+                                        + "logError"
+                                : value.equalsIgnoreCase("log_wran") ? "The correct value would be: "
+                                        + "logWarn"
+                                : "No such predefined template exception handler name");
                     }
                 } else {
                     setTemplateExceptionHandler((TemplateExceptionHandler) _ObjectBuilderSettingEvaluator.eval(
                             value, TemplateExceptionHandler.class, false, _SettingEvaluationEnvironment.getCurrent()));
                 }
-            } else if (ARITHMETIC_ENGINE_KEY_SNAKE_CASE.equals(name) || ARITHMETIC_ENGINE_KEY_CAMEL_CASE.equals(name)) {
+            } else if (ARITHMETIC_ENGINE_KEY.equals(name)) {
                 if (value.indexOf('.') == -1) { 
                     if ("bigdecimal".equalsIgnoreCase(value)) {
                         setArithmeticEngine(BigDecimalArithmeticEngine.INSTANCE);
@@ -1914,25 +1745,22 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
                     setArithmeticEngine((ArithmeticEngine) _ObjectBuilderSettingEvaluator.eval(
                             value, ArithmeticEngine.class, false, _SettingEvaluationEnvironment.getCurrent()));
                 }
-            } else if (BOOLEAN_FORMAT_KEY_SNAKE_CASE.equals(name) || BOOLEAN_FORMAT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (BOOLEAN_FORMAT_KEY.equals(name)) {
                 setBooleanFormat(value);
-            } else if (OUTPUT_ENCODING_KEY_SNAKE_CASE.equals(name) || OUTPUT_ENCODING_KEY_CAMEL_CASE.equals(name)) {
+            } else if (OUTPUT_ENCODING_KEY.equals(name)) {
                 setOutputEncoding(Charset.forName(value));
-            } else if (URL_ESCAPING_CHARSET_KEY_SNAKE_CASE.equals(name)
-                    || URL_ESCAPING_CHARSET_KEY_CAMEL_CASE.equals(name)) {
+            } else if (URL_ESCAPING_CHARSET_KEY.equals(name)) {
                 setURLEscapingCharset(Charset.forName(value));
-            } else if (AUTO_FLUSH_KEY_SNAKE_CASE.equals(name) || AUTO_FLUSH_KEY_CAMEL_CASE.equals(name)) {
+            } else if (AUTO_FLUSH_KEY.equals(name)) {
                 setAutoFlush(_StringUtil.getYesNo(value));
-            } else if (SHOW_ERROR_TIPS_KEY_SNAKE_CASE.equals(name) || SHOW_ERROR_TIPS_KEY_CAMEL_CASE.equals(name)) {
+            } else if (SHOW_ERROR_TIPS_KEY.equals(name)) {
                 setShowErrorTips(_StringUtil.getYesNo(value));
-            } else if (API_BUILTIN_ENABLED_KEY_SNAKE_CASE.equals(name)
-                    || API_BUILTIN_ENABLED_KEY_CAMEL_CASE.equals(name)) {
+            } else if (API_BUILTIN_ENABLED_KEY.equals(name)) {
                 setAPIBuiltinEnabled(_StringUtil.getYesNo(value));
-            } else if (NEW_BUILTIN_CLASS_RESOLVER_KEY_SNAKE_CASE.equals(name)
-                    || NEW_BUILTIN_CLASS_RESOLVER_KEY_CAMEL_CASE.equals(name)) {
+            } else if (NEW_BUILTIN_CLASS_RESOLVER_KEY.equals(name)) {
                 if ("unrestricted".equals(value)) {
                     setNewBuiltinClassResolver(TemplateClassResolver.UNRESTRICTED);
-                } else if ("allow_nothing".equals(value) || "allowNothing".equals(value)) {
+                } else if ("allowNothing".equals(value)) {
                     setNewBuiltinClassResolver(TemplateClassResolver.ALLOW_NOTHING);
                 } else if (value.indexOf(":") != -1) {
                     List<_KeyValuePair<String, List<String>>> segments = parseAsSegmentedList(value);
@@ -1954,10 +1782,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
                     }
                     setNewBuiltinClassResolver(
                             new OptInTemplateClassResolver(allowedClasses, trustedTemplates));
-                } else if ("allows_nothing".equals(value)) {
-                    throw new InvalidSettingValueException(
-                            name, value, "The correct value would be: allow_nothing");
-                } else if ("allowsNothing".equals(value)) {
+                } else if ("allowsNothing".equals(value) || "allows_nothing".equals(value)) {
                     throw new InvalidSettingValueException(
                             name, value, "The correct value would be: allowNothing");
                 } else if (value.indexOf('.') != -1) {
@@ -1970,14 +1795,13 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
                             "Not predefined class resolved name, nor follows class resolver definition syntax, nor "
                             + "looks like class name");
                 }
-            } else if (LAZY_AUTO_IMPORTS_KEY_SNAKE_CASE.equals(name) || LAZY_AUTO_IMPORTS_KEY_CAMEL_CASE.equals(name)) {
+            } else if (LAZY_AUTO_IMPORTS_KEY.equals(name)) {
                 setLazyAutoImports(value.equals(NULL_VALUE) ? null : Boolean.valueOf(_StringUtil.getYesNo(value)));
-            } else if (LAZY_IMPORTS_KEY_SNAKE_CASE.equals(name) || LAZY_IMPORTS_KEY_CAMEL_CASE.equals(name)) {
+            } else if (LAZY_IMPORTS_KEY.equals(name)) {
                 setLazyImports(_StringUtil.getYesNo(value));
-            } else if (AUTO_INCLUDE_KEY_SNAKE_CASE.equals(name)
-                    || AUTO_INCLUDE_KEY_CAMEL_CASE.equals(name)) {
+            } else if (AUTO_INCLUDES_KEY.equals(name)) {
                 setAutoIncludes(parseAsList(value));
-            } else if (AUTO_IMPORT_KEY_SNAKE_CASE.equals(name) || AUTO_IMPORT_KEY_CAMEL_CASE.equals(name)) {
+            } else if (AUTO_IMPORTS_KEY.equals(name)) {
                 setAutoImports(parseAsImportList(value));
             } else {
                 unknown = true;
@@ -2017,16 +1841,12 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
     }
 
     /**
-     * Returns the valid setting names that aren't {@link Configuration}-only.
+     * Returns the valid setting names for a {@link ProcessingConfiguration}.
      *
-     * @param camelCase
-     *            If we want the setting names with camel case naming convention, or with snake case (legacy) naming
-     *            convention.
-     * 
-     * @see Configuration.ExtendableBuilder#getSettingNames(boolean)
+     * @see Configuration.ExtendableBuilder#getSettingNames()
      */
-    public static Set<String> getSettingNames(boolean camelCase) {
-        return new _SortedArraySet<>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE);
+    public static Set<String> getSettingNames() {
+        return SETTING_NAMES;
     }
 
     private TimeZone parseTimeZoneSettingValue(String value) {
@@ -2043,7 +1863,7 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      * Creates the exception that should be thrown when a setting name isn't recognized.
      */
     protected final InvalidSettingNameException unknownSettingException(String name) {
-        Version removalVersion = getRemovalVersionForUnknownSetting(name);
+         Version removalVersion = getRemovalVersionForUnknownSetting(name);
          return removalVersion != null
                 ? new InvalidSettingNameException(name, removalVersion)
                 : new InvalidSettingNameException(name, getCorrectedNameForUnknownSetting(name));
@@ -2065,7 +1885,22 @@ public abstract class MutableProcessingConfiguration<SelfT extends MutableProces
      * @return The corrected name, or {@code null} if there's no known correction
      */
     protected String getCorrectedNameForUnknownSetting(String name) {
-        return null;
+        switch(name.toLowerCase()) {
+            case "autoinclude":
+            case "auto_include":
+            case "auto_includes":
+                return AUTO_INCLUDES_KEY;
+            case "autoimport":
+            case "auto_import":
+            case "auto_imports":
+                return AUTO_IMPORTS_KEY;
+            case "datetimeformat":
+            case "datetime_format":
+            case "date_time_format":
+                return DATE_TIME_FORMAT_KEY;
+            default:
+                return null;
+        }
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/NamingConvention.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/NamingConvention.java b/freemarker-core/src/main/java/org/apache/freemarker/core/NamingConvention.java
deleted file mode 100644
index 5c347c5..0000000
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/NamingConvention.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.freemarker.core;
-
-/**
- * Used as the value of the {@link ParsingConfiguration#getNamingConvention()} namingConvention} setting.
- */
-public enum NamingConvention  {
-    AUTO_DETECT,
-    LEGACY,
-    CAMEL_CASE;
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/NonSequenceOrCollectionException.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/NonSequenceOrCollectionException.java b/freemarker-core/src/main/java/org/apache/freemarker/core/NonSequenceOrCollectionException.java
index 7b58013..2836230 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/NonSequenceOrCollectionException.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/NonSequenceOrCollectionException.java
@@ -35,7 +35,7 @@ public class NonSequenceOrCollectionException extends UnexpectedTypeException {
         TemplateSequenceModel.class, TemplateCollectionModel.class
     };
     private static final String ITERABLE_SUPPORT_HINT = "The problematic value is a java.lang.Iterable. Using "
-            + "DefaultObjectWrapper(..., iterableSupport=true) as the object_wrapper setting of the FreeMarker "
+            + "DefaultObjectWrapper(..., iterableSupport=true) as the objectWrapper setting of the FreeMarker "
             + "configuration should solve this.";
     
     public NonSequenceOrCollectionException(Environment env) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ParseException.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ParseException.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ParseException.java
index 698562f..6f52d2f 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ParseException.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ParseException.java
@@ -401,7 +401,7 @@ public class ParseException extends IOException implements FMParserConstants {
                             endNames.add("#escape");
                             break;
                         case END_NOESCAPE:
-                            endNames.add("#noescape");
+                            endNames.add("#noEscape");
                             break;
                         case END_ASSIGN:
                             endNames.add("#assign");
@@ -434,11 +434,11 @@ public class ParseException extends IOException implements FMParserConstants {
                     + (endNames.size() == 0 ? "" : " You have an unclosed " + concatWithOrs(endNames) + ".");
         } else if (kind == ELSE) {
             return "Unexpected directive, \"#else\". "
-                    + "Check if you have a valid #if-#elseif-#else or #list-#else structure.";
+                    + "Check if you have a valid #if-#elseIf-#else or #list-#else structure.";
         } else if (kind == END_IF || kind == ELSE_IF) {
             return "Unexpected directive, "
                     + _StringUtil.jQuote(nextToken)
-                    + ". Check if you have a valid #if-#elseif-#else structure.";
+                    + ". Check if you have a valid #if-#elseIf-#else structure.";
         }
         return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
index 8edc322..5b6d619 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
@@ -77,56 +77,6 @@ public interface ParsingConfiguration {
     boolean isTagSyntaxSet();
 
     /**
-     * The naming convention used for the identifiers that are part of the template language. The available naming
-     * conventions are legacy (directive (tag) names are all-lower-case {@code likethis}, others are snake case
-     * {@code like_this}), and camel case ({@code likeThis}). The default is auto-detect, which detects the naming
-     * convention used and enforces that same naming convention for the whole template.
-     *
-     * <p>
-     * This setting doesn't influence what naming convention is used for the setting names outside templates. Also, it
-     * won't ever convert the names of user-defined things, like of data-model members, or the names of user defined
-     * macros/functions. It only influences the names of the built-in directives ({@code #elseIf} VS {@code elseif}),
-     * built-ins ({@code ?upper_case} VS {@code ?upperCase} ), special variables ({@code .data_model} VS
-     * {@code .dataModel}).
-     *
-     * <p>
-     * Which convention to use: FreeMarker prior to 2.3.23 has only supported
-     * {@link NamingConvention#LEGACY}, so that's how most templates and examples out there are
-     * written
-     * as of 2015. But as templates today are mostly written by programmers and often access Java API-s which already
-     * use camel case, {@link NamingConvention#CAMEL_CASE} is the recommended option for most projects.
-     * However, it's no necessary to make a application-wide decision; see auto-detection below.
-     *
-     * <p>
-     * FreeMarker will decide the naming convention automatically for each template individually when this setting is
-     * set to {@link NamingConvention#AUTO_DETECT} (which is the default). The naming convention of a template is
-     * decided when the first core (non-user-defined) identifier is met during parsing (not during processing) where the
-     * naming convention is relevant (like for {@code s?upperCase} or {@code s?upper_case} it's relevant, but for
-     * {@code s?length} it isn't). At that point, the naming convention of the template is decided, and any later core
-     * identifier that uses a different convention will be a parsing error. As the naming convention is decided per
-     * template, it's not a problem if a template and the other template it {@code #include}-s/{@code #import} uses a
-     * different convention.
-     *
-     * <p>
-     * FreeMarker always enforces the same naming convention to be used consistently within the same template "file".
-     * Additionally, when this setting is set to non-{@link NamingConvention#AUTO_DETECT}, the selected naming
-     * convention is enforced on all templates. Thus such a setup can be used to enforce an application-wide naming
-     * convention.
-     *
-     * @return
-     *            One of the {@link NamingConvention#AUTO_DETECT} or
-     *            {@link NamingConvention#LEGACY} or {@link NamingConvention#CAMEL_CASE}.
-     */
-    NamingConvention getNamingConvention();
-
-    /**
-     * Tells if this setting is set directly in this object. If not, then depending on the implementing class, reading
-     * the setting might returns a default value, or returns the value of the setting from a parent parsing
-     * configuration or throws a {@link CoreSettingValueNotSetException}.
-     */
-    boolean isNamingConventionSet();
-
-    /**
      * Whether the template parser will try to remove superfluous white-space around certain tags.
      */
     boolean getWhitespaceStripping();
@@ -176,7 +126,7 @@ public interface ParsingConfiguration {
      * But if all templates will have the same output format, you may set the
      * {@link #getOutputFormat() outputFormat} setting of the {@link Configuration}
      * after all, to a value like {@link HTMLOutputFormat#INSTANCE}, {@link XMLOutputFormat#INSTANCE}, etc. Also
-     * note that templates can specify their own output format like {@code <#ftl output_format="HTML">}, which
+     * note that templates can specify their own output format like {@code <#ftl outputFormat="HTML">}, which
      * overrides any configuration settings.
      *
      * @see Configuration#getRegisteredCustomOutputFormats()
@@ -228,11 +178,18 @@ public interface ParsingConfiguration {
 
     /**
      * See {@link TopLevelConfiguration#getIncompatibleImprovements()}; this is normally directly delegates to
-     * {@link Configuration#getIncompatibleImprovements()}, and it's always set.
+     * {@link Configuration#getIncompatibleImprovements()}, and that's always set.
      */
     Version getIncompatibleImprovements();
 
     /**
+     * Tells if this setting is set directly in this object. If not, then depending on the implementing class, reading
+     * the setting might returns a default value, or returns the value of the setting from a parent parsing
+     * configuration or throws a {@link CoreSettingValueNotSetException}.
+     */
+    boolean isIncompatibleImprovementsSet();
+
+    /**
      * The assumed display width of the tab character (ASCII 9), which influences the column number shown in error
      * messages (or the column number you get through other API-s). So for example if the users edit templates in an
      * editor where the tab width is set to 4, you should set this to 4 so that the column numbers printed by FreeMarker

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
new file mode 100644
index 0000000..64f43fc
--- /dev/null
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.freemarker.core;
+
+import java.nio.charset.Charset;
+
+import org.apache.freemarker.core.arithmetic.ArithmeticEngine;
+import org.apache.freemarker.core.outputformat.OutputFormat;
+
+/**
+ * Adds {@link Configuration} fallback to the {@link ParsingConfiguration} part of a {@link TemplateConfiguration}.
+ */
+final class ParsingConfigurationWithFallback implements ParsingConfiguration {
+
+    private final Configuration cfg;
+    private final TemplateConfiguration tCfg;
+
+    ParsingConfigurationWithFallback(Configuration cfg, TemplateConfiguration tCfg) {
+        this.cfg = cfg;
+        this.tCfg = tCfg;
+    }
+
+    @Override
+    public TemplateLanguage getTemplateLanguage() {
+        return tCfg.isTemplateLanguageSet() ? tCfg.getTemplateLanguage() : cfg.getTemplateLanguage();
+    }
+
+    @Override
+    public boolean isTemplateLanguageSet() {
+        return true;
+    }
+
+    @Override
+    public TagSyntax getTagSyntax() {
+        return tCfg.isTagSyntaxSet() ? tCfg.getTagSyntax() : cfg.getTagSyntax();
+    }
+
+    @Override
+    public boolean isTagSyntaxSet() {
+        return true;
+    }
+
+    @Override
+    public boolean getWhitespaceStripping() {
+        return tCfg.isWhitespaceStrippingSet() ? tCfg.getWhitespaceStripping() : cfg.getWhitespaceStripping();
+    }
+
+    @Override
+    public boolean isWhitespaceStrippingSet() {
+        return true;
+    }
+
+    @Override
+    public ArithmeticEngine getArithmeticEngine() {
+        return tCfg.isArithmeticEngineSet() ? tCfg.getArithmeticEngine() : cfg.getArithmeticEngine();
+    }
+
+    @Override
+    public boolean isArithmeticEngineSet() {
+        return true;
+    }
+
+    @Override
+    public AutoEscapingPolicy getAutoEscapingPolicy() {
+        return tCfg.isAutoEscapingPolicySet() ? tCfg.getAutoEscapingPolicy() : cfg.getAutoEscapingPolicy();
+    }
+
+    @Override
+    public boolean isAutoEscapingPolicySet() {
+        return true;
+    }
+
+    @Override
+    public OutputFormat getOutputFormat() {
+        return tCfg.isOutputFormatSet() ? tCfg.getOutputFormat() : cfg.getOutputFormat();
+    }
+
+    @Override
+    public boolean isOutputFormatSet() {
+        return true;
+    }
+
+    @Override
+    public boolean getRecognizeStandardFileExtensions() {
+        return tCfg.isRecognizeStandardFileExtensionsSet() ? tCfg.getRecognizeStandardFileExtensions()
+                : cfg.getRecognizeStandardFileExtensions();
+    }
+
+    @Override
+    public boolean isRecognizeStandardFileExtensionsSet() {
+        return true;
+    }
+
+    @Override
+    public Version getIncompatibleImprovements() {
+        // This can be only set on the Configuration-level
+        return cfg.getIncompatibleImprovements();
+    }
+
+    @Override
+    public boolean isIncompatibleImprovementsSet() {
+        // This can be only set on the Configuration-level
+        return cfg.isIncompatibleImprovementsSet();
+    }
+
+    @Override
+    public int getTabSize() {
+        return tCfg.isTabSizeSet() ? tCfg.getTabSize() : cfg.getTabSize();
+    }
+
+    @Override
+    public boolean isTabSizeSet() {
+        return true;
+    }
+
+    @Override
+    public Charset getSourceEncoding() {
+        return tCfg.isSourceEncodingSet() ? tCfg.getSourceEncoding() : cfg.getSourceEncoding();
+    }
+
+    @Override
+    public boolean isSourceEncodingSet() {
+        return true;
+    }
+}


[6/6] incubator-freemarker git commit: Merge remote-tracking branch 'origin/3' into 3

Posted by dd...@apache.org.
Merge remote-tracking branch 'origin/3' into 3

Conflicts:
	FM3-CHANGE-LOG.txt


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

Branch: refs/heads/3
Commit: bc35fa2379b8becdd55f998009b1875b382b29df
Parents: 51dba88 ce9ab30
Author: ddekany <dd...@apache.org>
Authored: Sun Jul 16 00:03:05 2017 +0200
Committer: ddekany <dd...@apache.org>
Committed: Sun Jul 16 00:03:05 2017 +0200

----------------------------------------------------------------------
 FM3-CHANGE-LOG.txt                              |   8 +-
 .../spring/web/view/AbstractFreeMarkerView.java | 170 ++++++++++++++++++
 .../spring/web/view/AbstractFreemarkerView.java | 170 ------------------
 .../spring/web/view/FreeMarkerView.java         | 168 ++++++++++++++++++
 .../spring/web/view/FreeMarkerViewResolver.java | 149 ++++++++++++++++
 .../spring/web/view/FreemarkerView.java         | 168 ------------------
 .../spring/web/view/FreemarkerViewResolver.java | 149 ----------------
 .../SpringResourceTemplateLoaderTest.java       |  84 +++++++++
 .../SpringResourceTemplateLoaderTest.java       |  84 ---------
 .../web/view/FreeMarkerViewResolverTest.java    |  98 +++++++++++
 .../spring/web/view/FreeMarkerViewTest.java     | 176 +++++++++++++++++++
 .../web/view/FreemarkerViewResolverTest.java    |  98 -----------
 .../spring/web/view/FreemarkerViewTest.java     | 176 -------------------
 13 files changed, 852 insertions(+), 846 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/bc35fa23/FM3-CHANGE-LOG.txt
----------------------------------------------------------------------
diff --cc FM3-CHANGE-LOG.txt
index b5544cb,e502498..52b00c9
--- a/FM3-CHANGE-LOG.txt
+++ b/FM3-CHANGE-LOG.txt
@@@ -307,5 -299,11 +307,11 @@@ the FreeMarer 3 changelog here
    tool does this conversion.)
  - Inside a #switch, #case can't be after #default anymore (this is actually a bug in FM2)
    (The template converter can't fix this automatically, but reports it as an error.)
 -- #else and #elseif tags must be ended without "/", for example, <#else/> is illegal now, <#else> is legal.
 +- #else and #elseIf tags must be ended without "/", for example, <#else/> is illegal now, <#else> is legal.
-   (The template converter tool does this conversion.)
+   (The template converter tool does this conversion.)
+ - Spring Framework Support (freemarker-spring): FREEMARKER-54, FREEMARKER-55
+   - ConfigurationFactoryBean, a new Spring Framework's FactoryBean to create Configuration, using Builder.
+   - SpringResourceTemplateLoader, a new TemplateLoader to load templates from Spring Framework's Resources.
+   - New FreeMarkerView and FreeMarkerViewResolver for MVC support. FreeMarkerView supports TaglibFactory and other
+     models by default like FreemarkerServlet does.
+ 


[5/6] incubator-freemarker git commit: Removed namingConvention setting, and made directive names, built-in names, special variable names, and setting names, camel case. (Other naming conventions, if needed, are planned to be handled with custom dialects

Posted by dd...@apache.org.
Removed namingConvention setting, and made directive names, built-in names, special variable names, and setting names, camel case. (Other naming conventions, if needed, are planned to be handled with custom dialects.)

Along the way had fixed some String setting name keys to match the setter/getter methids: "autoInclude" to "autoIncludes", "autoImport" to "autoImports", "datetimeFormat" to "dateTimeFormat".
Also, clarified which configuration scopes do "incompatibleImprovements" belong, also added isXxxSet method for this setting.


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

Branch: refs/heads/3
Commit: 51dba88295cfc6d9d0ef5d64f583b848591dcde2
Parents: aaa100c
Author: ddekany <dd...@apache.org>
Authored: Sat Jul 15 23:57:40 2017 +0200
Committer: ddekany <dd...@apache.org>
Committed: Sat Jul 15 23:59:20 2017 +0200

----------------------------------------------------------------------
 FM3-CHANGE-LOG.txt                              |  24 +-
 .../freemarker/converter/FM2ToFM3Converter.java |   2 -
 .../core/ActualNamingConvetionTest.java         |  67 ---
 .../apache/freemarker/core/CamelCaseTest.java   | 486 -------------------
 .../freemarker/core/ConfigurationTest.java      | 206 +++-----
 .../core/CustomTemplateResolverTest.java        |   4 +-
 .../apache/freemarker/core/DateFormatTest.java  |  14 +-
 .../core/InterpretAndEvalTemplateNameTest.java  |   4 +-
 ...leParsingAndProcessingConfigurationTest.java | 102 +---
 .../MutableProcessingConfigurationTest.java     | 156 +-----
 .../core/ObjectBuilderSettingsTest.java         |   2 +-
 .../core/OptInTemplateClassResolverTest.java    |  18 +-
 .../freemarker/core/OutputFormatTest.java       | 102 ++--
 .../core/ParsingErrorMessagesTest.java          |   3 +-
 .../apache/freemarker/core/SQLTimeZoneTest.java |  46 +-
 .../freemarker/core/SpecialVariableTest.java    |   4 +-
 .../core/TagSyntaxVariationsTest.java           |   2 +-
 .../core/TemplateConfigurationTest.java         |  67 +--
 .../freemarker/core/UnclosedCommentTest.java    |   8 +-
 .../core/model/impl/ErrorMessagesTest.java      |  16 +-
 .../org/apache/freemarker/core/ast-1.ast        |  10 +-
 .../apache/freemarker/core/ast-assignments.ast  |   2 +-
 .../org/apache/freemarker/core/ast-builtins.ast |   2 +-
 .../apache/freemarker/core/ast-locations.ast    |  16 +-
 .../core/ast-multipleignoredchildren.ast        |   2 +-
 .../core/ast-nestedignoredchildren.ast          |   2 +-
 .../org/apache/freemarker/core/ast-range.ast    |   2 +-
 .../freemarker/core/ast-strlitinterpolation.ast |   2 +-
 .../freemarker/core/ast-whitespacestripping.ast |   2 +-
 .../core/templatesuite/expected/noparse.txt     |  10 +-
 .../templatesuite/expected/string-builtins1.txt |  24 +-
 .../core/templatesuite/templates/comment.ftl    |   2 +-
 .../templates/dateformat-iso-like.ftl           |  14 +-
 .../templatesuite/templates/dateformat-java.ftl |  14 +-
 .../templatesuite/templates/dateparsing.ftl     |   6 +-
 .../core/templatesuite/templates/if.ftl         |   8 +-
 .../core/templatesuite/templates/noparse.ftl    |  10 +-
 .../core/templatesuite/templates/setting.ftl    |   2 +-
 .../templates/string-builtins1.ftl              |  26 +-
 .../freemarker/core/templatesuite/testcases.xml |  72 +--
 .../apache/freemarker/core/ASTDebugBreak.java   |   2 +-
 .../apache/freemarker/core/ASTDirAutoEsc.java   |   2 +-
 .../core/ASTDirCapturingAssignment.java         |   2 +-
 .../core/ASTDirIfElseIfElseContainer.java       |   4 +-
 .../freemarker/core/ASTDirIfOrElseOrElseIf.java |   6 +-
 .../apache/freemarker/core/ASTDirNoAutoEsc.java |   4 +-
 .../apache/freemarker/core/ASTDirNoEscape.java  |   4 +-
 .../freemarker/core/ASTDirOutputFormat.java     |   4 +-
 .../apache/freemarker/core/ASTDirSetting.java   |  52 +-
 .../apache/freemarker/core/ASTDirective.java    | 106 ++--
 .../apache/freemarker/core/ASTExpBuiltIn.java   | 251 +++++-----
 .../freemarker/core/ASTExpBuiltInVariable.java  |  95 ++--
 .../freemarker/core/ASTExpStringLiteral.java    |   4 +-
 .../freemarker/core/ASTImplicitParent.java      |   2 +-
 .../apache/freemarker/core/ASTStaticText.java   |   2 +-
 .../freemarker/core/BuiltInsForSequences.java   |   8 +-
 .../core/BuiltInsForStringsBasic.java           |   4 +-
 .../core/BuiltInsForStringsEncoding.java        |   2 +-
 .../apache/freemarker/core/Configuration.java   | 349 ++++---------
 .../org/apache/freemarker/core/Environment.java |   2 +-
 ...utableParsingAndProcessingConfiguration.java | 225 +++------
 .../core/MutableProcessingConfiguration.java    | 477 ++++++------------
 .../freemarker/core/NamingConvention.java       |  29 --
 .../core/NonSequenceOrCollectionException.java  |   2 +-
 .../apache/freemarker/core/ParseException.java  |   6 +-
 .../freemarker/core/ParsingConfiguration.java   |  61 +--
 .../core/ParsingConfigurationWithFallback.java  | 142 ++++++
 .../core/ProcessingConfiguration.java           |  24 +-
 .../org/apache/freemarker/core/Template.java    |  17 +-
 .../freemarker/core/TemplateBooleanFormat.java  |   2 +-
 .../freemarker/core/TemplateConfiguration.java  |  33 +-
 .../core/TemplateExceptionHandler.java          |   2 +-
 ...emplateParsingConfigurationWithFallback.java | 146 ------
 .../core/_ObjectBuilderSettingEvaluator.java    |   3 +-
 .../core/model/impl/SimpleMethod.java           |   2 +-
 .../core/templateresolver/TemplateResolver.java |   9 +-
 .../apache/freemarker/core/util/FTLUtil.java    |   6 +-
 .../freemarker/core/util/_SortedArraySet.java   |   2 +-
 .../freemarker/core/util/_StringUtil.java       |  21 +-
 freemarker-core/src/main/javacc/FTL.jj          | 206 +++-----
 .../misc/overloadedNumberRules/generator.ftl    |   2 +-
 .../apache/freemarker/dom/DOMSiblingTest.java   |   2 -
 .../java/org/apache/freemarker/dom/DOMTest.java |   4 +-
 .../freemarker/dom/templatesuite/testcases.xml  |  24 +-
 .../freemarker/servlet/FreemarkerServlet.java   |  16 +-
 .../servlet/jsp/webapps/basic/WEB-INF/web.xml   |  18 +-
 .../servlet/jsp/webapps/config/WEB-INF/web.xml  |   2 +-
 .../servlet/jsp/webapps/errors/WEB-INF/web.xml  |   8 +-
 .../jsp/webapps/multipleLoaders/WEB-INF/web.xml |   6 +-
 .../jsp/webapps/tldDiscovery/WEB-INF/web.xml    |  20 +-
 .../spring/ConfigurationFactoryBeanTest.java    |  13 +-
 .../freemarker/test/TemplateTestCase.java       |   4 +-
 .../org/apache/freemarker/test/TestUtil.java    |   2 +-
 93 files changed, 1220 insertions(+), 2782 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/FM3-CHANGE-LOG.txt
----------------------------------------------------------------------
diff --git a/FM3-CHANGE-LOG.txt b/FM3-CHANGE-LOG.txt
index 1791868..b5544cb 100644
--- a/FM3-CHANGE-LOG.txt
+++ b/FM3-CHANGE-LOG.txt
@@ -20,6 +20,12 @@
 Because the Manual won't be updated for a good while, we will lead
 the FreeMarer 3 changelog here:
 
+- Switched to camel case as the only supported naming convention. This is as if in FM2 you set the "namingConvention"
+  configuration setting to "camelCase", however the "namingConvention" setting was removed, as no other convention will
+  be supported (for the default dialect at least). Also, configuration setting names and values must use camel case
+  too (FM2 was forgiving there). This means `#elseif` becomes to ``#elseIf`, ``?upper_case`, `?upperCase`, and
+  if you configure FreeMarker with Properties, then `template_loader` becomes to `templateLoader`.
+  Note that the template converter tool takes care of this conversion.
 - Increased version number to 3.0.0 (nightly aka. SNAPSHOT)
 - Removed legacy extensions: rhyno, jython, xml (not to be confused with dom), jdom, ant.
 - Servlet 3.0 and JSP 2.2 and is the minimum requirement now (if Serlvet/JSP features are used at all).
@@ -171,9 +177,9 @@ the FreeMarer 3 changelog here:
   Also added a new setting, "templateLanguage", which decides this; the two available values are
   TemplateLanguage.FTL and TemplateLanguage.STATIC_TEXT.
 - Configuration.getTemplate has no "encoding" parameter anymore. Similarly #include has no "encoding" parameter either. The charset
-  of templates can be specified via Configuration.defaultEncoding and Configuration.templateConfigurations (for example based on the
-  directory it is in), or wirh the #ftl directive inside the template. Thus, a given template always has the same charset, no mater how
-  it's accessed.
+  of templates can be specified via Configuration.sourceEncoding and Configuration.templateConfigurations (for example
+  based on the directory it is in), or with the #ftl directive inside the template. Thus, a given template always has
+  the same charset, no mater how it's accessed.
 - #include-d/#import-ed templates don't inheirit the charset (encoding) of the #include-ing/#import-ing template. (Because,
   again, the charset of a template file is independent of how you access it.)
 - Removed Configuration.setEncoding(java.util.Locale, String) and the related other methods. Because of the new logic of template
@@ -260,18 +266,20 @@ the FreeMarer 3 changelog here:
                     .build())
 
 - Configuration-related int constants were replaced with enums:
-  - FM2 Configuration.${c}_NAMING_CONVENTION with NamingConvention.${c}
   - FM2 Configuration.${c}_TAG_SYNTAX with TagSyntax.${c}
   - FM2 Configuration.${c}_AUTO_ESCAPING_POLICY with AutoEscapingPolicy.${c}
 - TemplateClassResolver.UNRESTRICTED_RESOLVER and ALLOWS_NOTHING_RESOLVER was renamed
   to UNRESTRICTED and ALLOW_NOTHING. Also the String setting name "allows_nothing" and
-  "allowsNothing" were renamed to "allow_nothing" and "allowNothing".
+  "allowsNothing" were renamed to "allowNothing".
 - TemplateExceptionHandler.IGNORE_HANDLER, RETHROW_HANDLER, DEBUG_HANDLER and
   HTLM_DEBUG_HANDLER was renamed to IGNORE, RETHROW, DEBUG and HTML_DEBUG  
 - AttemptExceptionReporter.LOG_ERROR_REPORTER and LOG_WARN_REPORTER was renamed to
   LOG_ERROR and LOG_WARN (to be consistent with the new TemplateExceptionHandler names)
 - Renamed the `cacheStorage` Configuration setting to `templateCacheStorage`.
 - Renamed the `localizedLookup` Configuration setting to `localizedLookup`.
+- Renamed the `datetimeFormat` Configuration setting to `dateTimeFormat` (following Java 8 convention).
+- Renamed the String key for the historically incorrect `autoInclude` Configuration setting to `autoIncludes`.
+- Renamed the String key for the historically incorrect `autoImport` Configuration setting to `autoImports`.
 - Changed the defaults of some Configuration settings:
   - Changed the default of sourceEncoding ("encoding" earlier) to UTF-8 from the platform default charset.
     Using the platform default charset was proven to be fragile in practice,
@@ -279,9 +287,9 @@ the FreeMarer 3 changelog here:
     was unwillingly relying on the default.
   - Changed the default of templateExceptionHandler (template_exception_hander) to
     TemplateExceptionHandler.RETHROW from DEBUG
-  - Changed the default of sqlDateAndTimeTimeZone (sql_date_and_time_time_zone) to
+  - Changed the default of sqlDateAndTimeTimeZone (sqlDateAndTimeTimeZone) to
     TimeZone.default() from null (where null meant falling back to the timeZone setting value)
-  - Changed the default of templateNameFormat (template_name_format) to what's equivalent to
+  - Changed the default of templateNameFormat (templateNameFormat) to what's equivalent to
     FM2 DefaultTemplateNameFormat24. The old DefaultTemplateNameFormat was removed, and
     DefaultTemplateNameFormat24 was renamed to DefaultTemplateNameFormat.
 - Removed the logTemplateExceptions (log_template_exceptions) setting. FreeMarker now
@@ -299,5 +307,5 @@ the FreeMarer 3 changelog here:
   tool does this conversion.)
 - Inside a #switch, #case can't be after #default anymore (this is actually a bug in FM2)
   (The template converter can't fix this automatically, but reports it as an error.)
-- #else and #elseif tags must be ended without "/", for example, <#else/> is illegal now, <#else> is legal.
+- #else and #elseIf tags must be ended without "/", for example, <#else/> is illegal now, <#else> is legal.
   (The template converter tool does this conversion.)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
----------------------------------------------------------------------
diff --git a/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java b/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
index e233ccd..e9d7df3 100644
--- a/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
+++ b/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.regex.Pattern;
 
-import org.apache.freemarker.core.NamingConvention;
 import org.apache.freemarker.core.util._NullArgumentException;
 
 import com.google.common.collect.ImmutableMap;
@@ -173,7 +172,6 @@ public class FM2ToFM3Converter extends Converter {
         try {
             org.apache.freemarker.core.Configuration fm3Config = new org.apache.freemarker.core.Configuration
                     .Builder(org.apache.freemarker.core.Configuration.getVersion() /* highest possible by design */)
-                    .namingConvention(NamingConvention.CAMEL_CASE)
                     .outputFormat(converOutputFormat(result.getFM2Template().getOutputFormat()))
                     .build();
             new org.apache.freemarker.core.Template(null, result.getFM3Content(), fm3Config);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/ActualNamingConvetionTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ActualNamingConvetionTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ActualNamingConvetionTest.java
deleted file mode 100644
index 69a95c9..0000000
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ActualNamingConvetionTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.freemarker.core;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-
-import org.apache.freemarker.test.TestConfigurationBuilder;
-import org.junit.Test;
-
-public class ActualNamingConvetionTest {
-    
-    @Test
-    public void testUndetectable() throws IOException {
-        final String ftl = "<#if true>${x?size}</#if>";
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.AUTO_DETECT), NamingConvention.AUTO_DETECT);
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.LEGACY), NamingConvention.LEGACY);
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.CAMEL_CASE), NamingConvention.CAMEL_CASE);
-    }
-
-    @Test
-    public void testLegacyDetected() throws IOException {
-        final String ftl = "${x?upper_case}";
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.AUTO_DETECT), NamingConvention.LEGACY);
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.LEGACY), NamingConvention.LEGACY);
-    }
-
-    @Test
-    public void testCamelCaseDetected() throws IOException {
-        final String ftl = "${x?upperCase}";
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.AUTO_DETECT), NamingConvention.CAMEL_CASE);
-        assertEquals(getActualNamingConvention(ftl,
-                NamingConvention.CAMEL_CASE), NamingConvention.CAMEL_CASE);
-    }
-
-    private NamingConvention getActualNamingConvention(String ftl, NamingConvention namingConvention)
-            throws IOException {
-        return new Template(null, ftl,
-                new TestConfigurationBuilder().namingConvention(namingConvention).build())
-                .getActualNamingConvention();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/CamelCaseTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CamelCaseTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CamelCaseTest.java
deleted file mode 100644
index d2f3fa0..0000000
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CamelCaseTest.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.freemarker.core;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Set;
-
-import org.apache.freemarker.core.outputformat.impl.HTMLOutputFormat;
-import org.apache.freemarker.core.outputformat.impl.UndefinedOutputFormat;
-import org.apache.freemarker.core.util._StringUtil;
-import org.apache.freemarker.test.TemplateTest;
-import org.apache.freemarker.test.TestConfigurationBuilder;
-import org.junit.Test;
-
-public class CamelCaseTest extends TemplateTest {
-
-    @Test
-    public void camelCaseSpecialVars() throws IOException, TemplateException {
-        setConfiguration(new TestConfigurationBuilder()
-                .outputEncoding(StandardCharsets.UTF_8)
-                .urlEscapingCharset(StandardCharsets.ISO_8859_1)
-                .locale(Locale.GERMANY)
-                .build());
-        assertOutput("${.dataModel?isHash?c}", "true");
-        assertOutput("${.data_model?is_hash?c}", "true");
-        assertOutput("${.localeObject.toString()}", "de_DE");
-        assertOutput("${.locale_object.toString()}", "de_DE");
-        assertOutput("${.templateName!'null'}", "null");
-        assertOutput("${.template_name!'null'}", "null");
-        assertOutput("${.currentTemplateName!'null'}", "null");
-        assertOutput("${.current_template_name!'null'}", "null");
-        assertOutput("${.mainTemplateName!'null'}", "null");
-        assertOutput("${.main_template_name!'null'}", "null");
-        assertOutput("${.outputEncoding}", StandardCharsets.UTF_8.name());
-        assertOutput("${.output_encoding}", StandardCharsets.UTF_8.name());
-        assertOutput("${.outputFormat}", UndefinedOutputFormat.INSTANCE.getName());
-        assertOutput("${.output_format}", UndefinedOutputFormat.INSTANCE.getName());
-        assertOutput("${.urlEscapingCharset}", StandardCharsets.ISO_8859_1.name());
-        assertOutput("${.url_escaping_charset}", StandardCharsets.ISO_8859_1.name());
-        assertOutput("${.currentNode!'-'}", "-");
-        assertOutput("${.current_node!'-'}", "-");
-    }
-
-    @Test
-    public void camelCaseSpecialVarsInErrorMessage() throws IOException, TemplateException {
-        assertErrorContains("${.fooBar}", "dataModel", "\\!data_model");
-        assertErrorContains("${.foo_bar}", "data_model", "\\!dataModel");
-        // [2.4] If camel case will be the recommended style, then this need to be inverted:
-        assertErrorContains("${.foo}", "data_model", "\\!dataModel");
-        
-        assertErrorContains("<#if x><#elseIf y></#if>${.foo}", "dataModel", "\\!data_model");
-        assertErrorContains("<#if x><#elseif y></#if>${.foo}", "data_model", "\\!dataModel");
-
-        setConfigurationToCamelCaseNamingConvention();
-        assertErrorContains("${.foo}", "dataModel", "\\!data_model");
-
-        setConfigurationToLegacyCaseNamingConvention();
-        assertErrorContains("${.foo}", "data_model", "\\!dataModel");
-    }
-    
-    @Test
-    public void camelCaseSettingNames() throws IOException, TemplateException {
-        assertOutput("<#setting booleanFormat='Y,N'>${true} <#setting booleanFormat='+,-'>${true}", "Y +");
-        assertOutput("<#setting boolean_format='Y,N'>${true} <#setting boolean_format='+,-'>${true}", "Y +");
-        
-        // Still works inside ?interpret
-        assertOutput("<@r\"<#setting booleanFormat='Y,N'>${true}\"?interpret />", "Y");
-    }
-    
-    @Test
-    public void camelCaseFtlHeaderParameters() throws IOException, TemplateException {
-        assertOutput(
-                "<#ftl "
-                + "stripWhitespace=false "
-                + "stripText=true "
-                + "outputFormat='" + HTMLOutputFormat.INSTANCE.getName() + "' "
-                + "autoEsc=true "
-                + "nsPrefixes={} "
-                + ">\nx\n<#if true>\n${.outputFormat}\n</#if>\n",
-                "\nHTML\n");
-
-        assertOutput(
-                "<#ftl "
-                + "strip_whitespace=false "
-                + "strip_text=true "
-                + "output_format='" + HTMLOutputFormat.INSTANCE.getName() + "' "
-                + "auto_esc=true "
-                + "ns_prefixes={} "
-                + ">\nx\n<#if true>\n${.output_format}\n</#if>\n",
-                "\nHTML\n");
-
-        assertErrorContains("<#ftl strip_text=true xmlns={}>", "ns_prefixes", "\\!nsPrefixes");
-        assertErrorContains("<#ftl stripText=true xmlns={}>", "nsPrefixes");
-        
-        assertErrorContains("<#ftl stripWhitespace=true strip_text=true>", "naming convention");
-        assertErrorContains("<#ftl strip_whitespace=true stripText=true>", "naming convention");
-        assertErrorContains("<#ftl stripWhitespace=true>${.foo_bar}", "naming convention");
-        assertErrorContains("<#ftl strip_whitespace=true>${.fooBar}", "naming convention");
-
-        setConfiguration(new TestConfigurationBuilder()
-                .namingConvention(NamingConvention.CAMEL_CASE)
-                .outputEncoding(StandardCharsets.UTF_8)
-                .build());
-        assertErrorContains("<#ftl strip_whitespace=true>", "naming convention");
-        assertOutput("<#ftl stripWhitespace=true>${.outputEncoding}", StandardCharsets.UTF_8.name());
-        
-        setConfiguration(new TestConfigurationBuilder()
-                .namingConvention(NamingConvention.LEGACY)
-                .outputEncoding(StandardCharsets.UTF_8)
-                .build());
-        assertErrorContains("<#ftl stripWhitespace=true>", "naming convention");
-        assertOutput("<#ftl strip_whitespace=true>${.output_encoding}", StandardCharsets.UTF_8.name());
-        
-        setConfiguration(new TestConfigurationBuilder()
-                .namingConvention(NamingConvention.AUTO_DETECT)
-                .outputEncoding(StandardCharsets.UTF_8)
-                .build());
-        assertOutput("<#ftl stripWhitespace=true>${.outputEncoding}", StandardCharsets.UTF_8.name());
-        assertOutput("<#ftl encoding='iso-8859-1' stripWhitespace=true>${.outputEncoding}", StandardCharsets.UTF_8.name());
-        assertOutput("<#ftl stripWhitespace=true encoding='iso-8859-1'>${.outputEncoding}", StandardCharsets.UTF_8.name());
-        assertOutput("<#ftl encoding='iso-8859-1' strip_whitespace=true>${.output_encoding}", StandardCharsets.UTF_8.name());
-        assertOutput("<#ftl strip_whitespace=true encoding='iso-8859-1'>${.output_encoding}", StandardCharsets.UTF_8.name());
-    }
-    
-    @Test
-    public void camelCaseSettingNamesInErrorMessages() throws IOException, TemplateException {
-        assertErrorContains("<#setting fooBar=1>", "booleanFormat", "\\!boolean_format");
-        assertErrorContains("<#setting foo_bar=1>", "boolean_format", "\\!booleanFormat");
-        // [2.4] If camel case will be the recommended style, then this need to be inverted:
-        assertErrorContains("<#setting foo=1>", "boolean_format", "\\!booleanFormat");
-
-        assertErrorContains("<#if x><#elseIf y></#if><#setting foo=1>", "booleanFormat", "\\!boolean_format");
-        assertErrorContains("<#if x><#elseif y></#if><#setting foo=1>", "boolean_format", "\\!booleanFormat");
-
-        setConfigurationToCamelCaseNamingConvention();
-        assertErrorContains("<#setting foo=1>", "booleanFormat", "\\!boolean_format");
-
-        setConfigurationToLegacyCaseNamingConvention();
-        assertErrorContains("<#setting foo=1>", "boolean_format", "\\!booleanFormat");
-    }
-    
-    @Test
-    public void camelCaseIncludeParameters() throws IOException, TemplateException {
-        assertOutput("<#ftl stripWhitespace=true>[<#include 'noSuchTemplate' ignoreMissing=true>]", "[]");
-        assertOutput("<#ftl strip_whitespace=true>[<#include 'noSuchTemplate' ignore_missing=true>]", "[]");
-        assertErrorContains("<#ftl stripWhitespace=true>[<#include 'noSuchTemplate' ignore_missing=true>]",
-                "naming convention", "ignore_missing");
-        assertErrorContains("<#ftl strip_whitespace=true>[<#include 'noSuchTemplate' ignoreMissing=true>]",
-                "naming convention", "ignoreMissing");
-    }
-    
-    @Test
-    public void specialVarsHasBothNamingStyle() throws IOException, TemplateException {
-        assertContainsBothNamingStyles(
-                new HashSet(Arrays.asList(ASTExpBuiltInVariable.SPEC_VAR_NAMES)),
-                new NamePairAssertion() { @Override
-                public void assertPair(String name1, String name2) { } });
-    }
-    
-    @Test
-    public void camelCaseBuiltIns() throws IOException, TemplateException {
-        assertOutput("${'x'?upperCase}", "X");
-        assertOutput("${'x'?upper_case}", "X");
-    }
-
-    @Test
-    public void stringLiteralInterpolation() throws IOException, TemplateException {
-        assertEquals(NamingConvention.AUTO_DETECT, getConfiguration().getNamingConvention());
-        addToDataModel("x", "x");
-        
-        assertOutput("${'-${x?upperCase}-'} ${x?upperCase}", "-X- X");
-        assertOutput("${x?upperCase} ${'-${x?upperCase}-'}", "X -X-");
-        assertOutput("${'-${x?upper_case}-'} ${x?upper_case}", "-X- X");
-        assertOutput("${x?upper_case} ${'-${x?upper_case}-'}", "X -X-");
-
-        assertErrorContains("${'-${x?upper_case}-'} ${x?upperCase}",
-                "naming convention", "legacy", "upperCase", "detection", "9");
-        assertErrorContains("${x?upper_case} ${'-${x?upperCase}-'}",
-                "naming convention", "legacy", "upperCase", "detection", "5");
-        assertErrorContains("${'-${x?upperCase}-'} ${x?upper_case}",
-                "naming convention", "camel", "upper_case");
-        assertErrorContains("${x?upperCase} ${'-${x?upper_case}-'}",
-                "naming convention", "camel", "upper_case");
-
-        setConfigurationToCamelCaseNamingConvention();
-        assertOutput("${'-${x?upperCase}-'} ${x?upperCase}", "-X- X");
-        assertErrorContains("${'-${x?upper_case}-'}",
-                "naming convention", "camel", "upper_case", "\\!detection");
-
-        setConfigurationToLegacyCaseNamingConvention();
-        assertOutput("${'-${x?upper_case}-'} ${x?upper_case}", "-X- X");
-        assertErrorContains("${'-${x?upperCase}-'}",
-                "naming convention", "legacy", "upperCase", "\\!detection");
-    }
-    
-    @Test
-    public void evalAndInterpret() throws IOException, TemplateException {
-        assertEquals(NamingConvention.AUTO_DETECT, getConfiguration().getNamingConvention());
-        // The naming convention detected doesn't affect the enclosing template's naming convention.
-        // - ?eval:
-        assertOutput("${\"'x'?upperCase\"?eval}${'x'?upper_case}", "XX");
-        assertOutput("${\"'x'?upper_case\"?eval}${'x'?upperCase}", "XX");
-        assertOutput("${'x'?upperCase}${\"'x'?upper_case\"?eval}", "XX");
-        assertErrorContains("${\"'x'\n?upperCase\n?is_string\"?eval}",
-                "naming convention", "camel", "upperCase", "is_string", "line 2", "line 3");
-        // - ?interpret:
-        assertOutput("<@r\"${'x'?upperCase}\"?interpret />${'x'?upper_case}", "XX");
-        assertOutput("<@r\"${'x'?upper_case}\"?interpret />${'x'?upperCase}", "XX");
-        assertOutput("${'x'?upper_case}<@r\"${'x'?upperCase}\"?interpret />", "XX");
-        assertErrorContains("<@r\"${'x'\n?upperCase\n?is_string}\"?interpret />",
-                "naming convention", "camel", "upperCase", "is_string", "line 2", "line 3");
-        
-        // Will be inherited by ?eval-ed/?interpreted fragments:
-        setConfigurationToCamelCaseNamingConvention();
-        // - ?eval:
-        assertErrorContains("${\"'x'?upper_case\"?eval}", "naming convention", "camel", "upper_case");
-        assertOutput("${\"'x'?upperCase\"?eval}", "X");
-        // - ?interpret:
-        assertErrorContains("<@r\"${'x'?upper_case}\"?interpret />", "naming convention", "camel", "upper_case");
-        assertOutput("<@r\"${'x'?upperCase}\"?interpret />", "X");
-        
-        // Again, will be inherited by ?eval-ed/?interpreted fragments:
-        setConfigurationToLegacyCaseNamingConvention();
-        // - ?eval:
-        assertErrorContains("${\"'x'?upperCase\"?eval}", "naming convention", "legacy", "upperCase");
-        assertOutput("${\"'x'?upper_case\"?eval}", "X");
-        // - ?interpret:
-        assertErrorContains("<@r\"${'x'?upperCase}\"?interpret />", "naming convention", "legacy", "upperCase");
-        assertOutput("<@r\"${'x'?upper_case}\"?interpret />", "X");
-    }
-
-    private void setConfigurationToLegacyCaseNamingConvention() {
-        setConfiguration(new TestConfigurationBuilder()
-                .namingConvention(NamingConvention.LEGACY)
-                .build());
-    }
-
-    @Test
-    public void camelCaseBuiltInErrorMessage() throws IOException, TemplateException {
-        assertErrorContains("${'x'?upperCasw}", "upperCase", "\\!upper_case");
-        assertErrorContains("${'x'?upper_casw}", "upper_case", "\\!upperCase");
-        // [2.4] If camel case will be the recommended style, then this need to be inverted:
-        assertErrorContains("${'x'?foo}", "upper_case", "\\!upperCase");
-        
-        assertErrorContains("<#if x><#elseIf y></#if> ${'x'?foo}", "upperCase", "\\!upper_case");
-        assertErrorContains("<#if x><#elseif y></#if>${'x'?foo}", "upper_case", "\\!upperCase");
-
-        setConfigurationToCamelCaseNamingConvention();
-        assertErrorContains("${'x'?foo}", "upperCase", "\\!upper_case");
-        setConfigurationToLegacyCaseNamingConvention();
-        assertErrorContains("${'x'?foo}", "upper_case", "\\!upperCase");
-    }
-
-    private void setConfigurationToCamelCaseNamingConvention() {
-        setConfiguration(new TestConfigurationBuilder()
-                .namingConvention(NamingConvention.CAMEL_CASE)
-                .build());
-    }
-
-    @Test
-    public void builtInsHasBothNamingStyle() throws IOException, TemplateException {
-        assertContainsBothNamingStyles(getConfiguration().getSupportedBuiltInNames(), new NamePairAssertion() {
-
-            @Override
-            public void assertPair(String name1, String name2) {
-                ASTExpBuiltIn bi1  = ASTExpBuiltIn.BUILT_INS_BY_NAME.get(name1);
-                ASTExpBuiltIn bi2 = ASTExpBuiltIn.BUILT_INS_BY_NAME.get(name2);
-                assertTrue("\"" + name1 + "\" and \"" + name2 + "\" doesn't belong to the same BI object.",
-                        bi1 == bi2);
-            }
-            
-        });
-    }
-
-    private void assertContainsBothNamingStyles(Set<String> names, NamePairAssertion namePairAssertion) {
-        Set<String> underscoredNamesWithCamelCasePair = new HashSet<>();
-        for (String name : names) {
-            if (_StringUtil.getIdentifierNamingConvention(name) == NamingConvention.CAMEL_CASE) {
-                String underscoredName = correctIsoBIExceptions(_StringUtil.camelCaseToUnderscored(name)); 
-                assertTrue(
-                        "Missing underscored variation \"" + underscoredName + "\" for \"" + name + "\".",
-                        names.contains(underscoredName));
-                assertTrue(underscoredNamesWithCamelCasePair.add(underscoredName));
-                
-                namePairAssertion.assertPair(name, underscoredName);
-            }
-        }
-        for (String name : names) {
-            if (_StringUtil.getIdentifierNamingConvention(name) == NamingConvention.LEGACY) {
-                assertTrue("Missing camel case variation for \"" + name + "\".",
-                        underscoredNamesWithCamelCasePair.contains(name));
-            }
-        }
-    }
-    
-    private String correctIsoBIExceptions(String underscoredName) {
-        return underscoredName.replace("_n_z", "_nz").replace("_f_z", "_fz");
-    }
-    
-    @Test
-    public void camelCaseDirectives() throws IOException, TemplateException {
-        camelCaseDirectives(false);
-        setConfiguration(new TestConfigurationBuilder()
-                .tagSyntax(TagSyntax.AUTO_DETECT)
-                .build());
-        camelCaseDirectives(true);
-    }
-
-    private void camelCaseDirectives(boolean squared) throws IOException, TemplateException {
-        assertOutput(
-                squared("<#list 1..4 as x><#if x == 1>one <#elseIf x == 2>two <#elseIf x == 3>three "
-                        + "<#else>more</#if></#list>", squared),
-                "one two three more");
-        assertOutput(
-                squared("<#list 1..4 as x><#if x == 1>one <#elseif x == 2>two <#elseif x == 3>three "
-                        + "<#else>more</#if></#list>", squared),
-                "one two three more");
-        
-        assertOutput(
-                squared("<#escape x as x?upperCase>${'a'}<#noEscape>${'b'}</#noEscape></#escape>", squared),
-                "Ab");
-        assertOutput(
-                squared("<#escape x as x?upper_case>${'a'}<#noescape>${'b'}</#noescape></#escape>", squared),
-                "Ab");
-        
-        assertOutput(
-                squared("<#noParse></#noparse></#noParse>", squared),
-                squared("</#noparse>", squared));
-        assertOutput(
-                squared("<#noparse></#noParse></#noparse>", squared),
-                squared("</#noParse>", squared));
-    }
-    
-    private String squared(String ftl, boolean squared) {
-        return squared ? ftl.replace('<', '[').replace('>', ']') : ftl;
-    }
-
-    @Test
-    public void explicitNamingConvention() throws IOException, TemplateException {
-        explicitNamingConvention(false);
-        explicitNamingConvention(true);
-    }
-    
-    private void explicitNamingConvention(boolean squared) throws IOException, TemplateException {
-        TagSyntax tagSyntax = squared ? TagSyntax.AUTO_DETECT
-                : TagSyntax.ANGLE_BRACKET;
-        setConfiguration(new TestConfigurationBuilder()
-                .tagSyntax(tagSyntax)
-                .namingConvention(NamingConvention.CAMEL_CASE)
-                .build());
-
-        assertErrorContains(
-                squared("<#if true>t<#elseif false>f</#if>", squared),
-                "naming convention", "camel", "#elseif");
-        assertOutput(
-                squared("<#if true>t<#elseIf false>f</#if>", squared),
-                "t");
-        
-        assertErrorContains(
-                squared("<#noparse>${x}</#noparse>", squared),
-                "naming convention", "camel", "#noparse");
-        assertOutput(
-                squared("<#noParse>${x}</#noParse>", squared),
-                "${x}");
-        
-        assertErrorContains(
-                squared("<#escape x as -x><#noescape>${1}</#noescape></#escape>", squared),
-                "naming convention", "camel", "#noescape");
-        assertOutput(
-                squared("<#escape x as -x><#noEscape>${1}</#noEscape></#escape>", squared),
-                "1");
-
-        // ---
-
-        setConfiguration(new TestConfigurationBuilder()
-                .tagSyntax(tagSyntax)
-                .namingConvention(NamingConvention.LEGACY)
-                .build());
-
-        assertErrorContains(
-                squared("<#if true>t<#elseIf false>f</#if>", squared),
-                "naming convention", "legacy", "#elseIf");
-        assertOutput(
-                squared("<#if true>t<#elseif false>f</#if>", squared),
-                "t");
-        
-        assertErrorContains(
-                squared("<#noParse>${x}</#noParse>", squared),
-                "naming convention", "legacy", "#noParse");
-        assertOutput(
-                squared("<#noparse>${x}</#noparse>", squared),
-                "${x}");
-        
-        assertErrorContains(
-                squared("<#escape x as -x><#noEscape>${1}</#noEscape></#escape>", squared),
-                "naming convention", "legacy", "#noEscape");
-        assertOutput(
-                squared("<#escape x as -x><#noescape>${1}</#noescape></#escape>", squared),
-                "1");
-    }
-    
-    @Test
-    public void inconsistentAutoDetectedNamingConvention() {
-        assertErrorContains(
-                "<#if x><#elseIf y><#elseif z></#if>",
-                "naming convention", "camel");
-        assertErrorContains(
-                "<#if x><#elseif y><#elseIf z></#if>",
-                "naming convention", "legacy");
-        assertErrorContains(
-                "<#if x><#elseIf y></#if><#noparse></#noparse>",
-                "naming convention", "camel");
-        assertErrorContains(
-                "<#if x><#elseif y></#if><#noParse></#noParse>",
-                "naming convention", "legacy");
-        assertErrorContains(
-                "<#if x><#elseif y><#elseIf z></#if>",
-                "naming convention", "legacy");
-        assertErrorContains(
-                "<#escape x as x + 1><#noEscape></#noescape></#escape>",
-                "naming convention", "camel");
-        assertErrorContains(
-                "<#escape x as x + 1><#noEscape></#noEscape><#noescape></#noescape></#escape>",
-                "naming convention", "camel");
-        assertErrorContains(
-                "<#escape x as x + 1><#noescape></#noEscape></#escape>",
-                "naming convention", "legacy");
-        assertErrorContains(
-                "<#escape x as x + 1><#noescape></#noescape><#noEscape></#noEscape></#escape>",
-                "naming convention", "legacy");
-
-        assertErrorContains("${x?upperCase?is_string}",
-                "naming convention", "camel", "upperCase", "is_string");
-        assertErrorContains("${x?upper_case?isString}",
-                "naming convention", "legacy", "upper_case", "isString");
-
-        assertErrorContains("<#setting outputEncoding='utf-8'>${x?is_string}",
-                "naming convention", "camel", "outputEncoding", "is_string");
-        assertErrorContains("<#setting output_encoding='utf-8'>${x?isString}",
-                "naming convention", "legacy", "output_encoding", "isString");
-        
-        assertErrorContains("${x?isString}<#setting output_encoding='utf-8'>",
-                "naming convention", "camel", "isString", "output_encoding");
-        assertErrorContains("${x?is_string}<#setting outputEncoding='utf-8'>",
-                "naming convention", "legacy", "is_string", "outputEncoding");
-        
-        assertErrorContains("${.outputEncoding}${x?is_string}",
-                "naming convention", "camel", "outputEncoding", "is_string");
-        assertErrorContains("${.output_encoding}${x?isString}",
-                "naming convention", "legacy", "output_encoding", "isString");
-        
-        assertErrorContains("${x?upperCase}<#noparse></#noparse>",
-                "naming convention", "camel", "upperCase", "noparse");
-        assertErrorContains("${x?upper_case}<#noParse></#noParse>",
-                "naming convention", "legacy", "upper_case", "noParse");
-    }
-    
-    private interface NamePairAssertion {
-        
-        void assertPair(String name1, String name2);
-        
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ConfigurationTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
index 8882a3c..2f7af7b 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
@@ -29,16 +29,21 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.io.StringWriter;
 import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import java.util.TimeZone;
+import java.util.TreeSet;
 
 import org.apache.freemarker.core.model.TemplateModelException;
 import org.apache.freemarker.core.model.TemplateScalarModel;
@@ -80,7 +85,6 @@ import org.apache.freemarker.core.userpkg.SeldomEscapedOutputFormat;
 import org.apache.freemarker.core.util._CollectionUtil;
 import org.apache.freemarker.core.util._DateUtil;
 import org.apache.freemarker.core.util._NullWriter;
-import org.apache.freemarker.core.util._StringUtil;
 import org.apache.freemarker.core.valueformat.TemplateDateFormatFactory;
 import org.apache.freemarker.core.valueformat.TemplateNumberFormatFactory;
 import org.junit.Test;
@@ -594,7 +598,7 @@ public class ConfigurationTest {
         
         assertTrue(cfg.getRegisteredCustomOutputFormats().isEmpty());
         
-        cfg.setSetting(REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_CAMEL_CASE,
+        cfg.setSetting(REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY,
                 "[org.apache.freemarker.core.userpkg.CustomHTMLOutputFormat(), "
                 + "org.apache.freemarker.core.userpkg.DummyOutputFormat()]");
         assertEquals(
@@ -602,7 +606,7 @@ public class ConfigurationTest {
                 new ArrayList(cfg.getRegisteredCustomOutputFormats()));
         
         try {
-            cfg.setSetting(REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_SNAKE_CASE, "[TemplateConfiguration()]");
+            cfg.setSetting(REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY, "[TemplateConfiguration()]");
             fail();
         } catch (InvalidSettingValueException e) {
             assertThat(e.getMessage(), containsString(OutputFormat.class.getSimpleName()));
@@ -623,7 +627,7 @@ public class ConfigurationTest {
         Configuration.Builder cfgB = new Configuration.Builder(Configuration.VERSION_3_0_0);
         assertEquals(AttemptExceptionReporter.LOG_ERROR, cfgB.getAttemptExceptionReporter());
         assertFalse(cfgB.isAttemptExceptionReporterSet());
-        cfgB.setSetting(MutableProcessingConfiguration.ATTEMPT_EXCEPTION_REPORTER_KEY, "log_warn");
+        cfgB.setSetting(MutableProcessingConfiguration.ATTEMPT_EXCEPTION_REPORTER_KEY, "logWarn");
         assertEquals(AttemptExceptionReporter.LOG_WARN, cfgB.getAttemptExceptionReporter());
         assertTrue(cfgB.isAttemptExceptionReporterSet());
         cfgB.setSetting(MutableProcessingConfiguration.ATTEMPT_EXCEPTION_REPORTER_KEY, "default");
@@ -726,138 +730,91 @@ public class ConfigurationTest {
 
     @Test
     public void testGetSettingNamesAreSorted() throws Exception {
-        for (boolean camelCase : new boolean[] { false, true }) {
-            List<String> names = new ArrayList<>(Builder.getSettingNames(camelCase));
-            List<String> inheritedNames = new ArrayList<>(
-                    MutableParsingAndProcessingConfiguration.getSettingNames(camelCase));
-            assertStartsWith(names, inheritedNames);
-            
-            String prevName = null;
-            for (int i = inheritedNames.size(); i < names.size(); i++) {
-                String name = names.get(i);
-                if (prevName != null) {
-                    assertThat(name, greaterThan(prevName));
-                }
-                prevName = name;
+        List<String> names = new ArrayList<>(Builder.getSettingNames());
+        List<String> inheritedNames = new ArrayList<>(
+                MutableParsingAndProcessingConfiguration.getSettingNames());
+        assertStartsWith(names, inheritedNames);
+
+        String prevName = null;
+        for (int i = inheritedNames.size(); i < names.size(); i++) {
+            String name = names.get(i);
+            if (prevName != null) {
+                assertThat(name, greaterThan(prevName));
             }
+            prevName = name;
         }
     }
 
     @Test
-    public void testGetSettingNamesNameConventionsContainTheSame() throws Exception {
-        MutableProcessingConfigurationTest.testGetSettingNamesNameConventionsContainTheSame(
-                new ArrayList<>(Builder.getSettingNames(false)),
-                new ArrayList<>(Builder.getSettingNames(true)));
-    }
-
-    @Test
-    public void testStaticFieldKeysCoverAllGetSettingNames() throws Exception {
-        List<String> names = new ArrayList<>(Builder.getSettingNames(false));
-        for (String name :  names) {
-            assertTrue("No field was found for " + name, keyFieldExists(name));
-        }
-    }
-    
-    @Test
-    public void testGetSettingNamesCoversAllStaticKeyFields() throws Exception {
-        Collection<String> names = Builder.getSettingNames(false);
-        
-        for (Class<?> cfgableClass : new Class[] {
-                Configuration.class,
-                MutableParsingAndProcessingConfiguration.class,
-                MutableProcessingConfiguration.class }) {
-            for (Field f : cfgableClass.getFields()) {
-                if (f.getName().endsWith("_KEY")) {
-                    final Object name = f.get(null);
-                    assertTrue("Missing setting name: " + name, names.contains(name));
+    public void testAllSettingsAreCoveredByMutableSettingsObject() throws Exception {
+        testAllSettingsAreCoveredByMutableSettingsObject(TopLevelConfiguration.class, Configuration.Builder.class);
+    }
+
+    @SuppressWarnings("rawtypes")
+    public static void testAllSettingsAreCoveredByMutableSettingsObject(
+            Class<?> settingsInterface, Class<?> settingsMutableObjectClass) throws Exception {
+        Set<String> beanSettingNames = new TreeSet<>();
+        Set<String> isSetSettingNames = new TreeSet<>();
+        for (Method method : settingsInterface.getMethods()) {
+            String name = method.getName();
+            if (method.getParameterTypes().length == 0 && method.getReturnType() != void.class
+                    && (method.getModifiers() & Modifier.PUBLIC) != 0) {
+                if (name.startsWith("is") && name.endsWith("Set") && method.getReturnType() == boolean.class) {
+                    isSetSettingNames.add(toGetterNameToSettingNameCase(name.substring(2, name.length() - 3)));
+                } else if (name.startsWith("get")) {
+                    String settingName = toGetterNameToSettingNameCase(name.substring(3));
+                    beanSettingNames.add(settingName);
                 }
             }
         }
-    }
-    
-    @Test
-    public void testKeyStaticFieldsHasAllVariationsAndCorrectFormat() throws IllegalArgumentException, IllegalAccessException {
-        MutableProcessingConfigurationTest.testKeyStaticFieldsHasAllVariationsAndCorrectFormat(ExtendableBuilder.class);
+
+        assertEquals("Not all getXxx have isXxxSet pair", beanSettingNames, isSetSettingNames);
+
+        Method method = settingsMutableObjectClass.getMethod("getSettingNames");
+        assertTrue((method.getModifiers() & Modifier.STATIC) != 0);
+        assertEquals("Names deduced from getXxx methods and getSettingNames() result differs",
+                beanSettingNames, new TreeSet<>((Set) method.invoke(null)));
+
+        // TODO [FM3] Check if all has setXxx, unsetXxx, etc.
     }
 
-    @Test
-    public void testSetSettingSupportsBothNamingConventions() throws Exception {
-        Builder cfgB = new Builder(VERSION_3_0_0);
-        
-        cfgB.setSetting(SOURCE_ENCODING_KEY_CAMEL_CASE, StandardCharsets.UTF_16LE.name());
-        assertEquals(StandardCharsets.UTF_16LE, cfgB.getSourceEncoding());
-        cfgB.setSetting(SOURCE_ENCODING_KEY_SNAKE_CASE, StandardCharsets.UTF_8.name());
-        assertEquals(StandardCharsets.UTF_8, cfgB.getSourceEncoding());
-        
-        for (String nameCC : cfgB.getSettingNames(true)) {
-            for (String value : new String[] { "1", "default", "true" }) {
-                Exception resultCC = null;
-                try {
-                    cfgB.setSetting(nameCC, value);
-                } catch (Exception e) {
-                    assertThat(e, not(instanceOf(InvalidSettingNameException.class)));
-                    resultCC = e;
-                }
-                
-                String nameSC = _StringUtil.camelCaseToUnderscored(nameCC);
-                Exception resultSC = null;
-                try {
-                    cfgB.setSetting(nameSC, value);
-                } catch (Exception e) {
-                    assertThat(e, not(instanceOf(InvalidSettingNameException.class)));
-                    resultSC = e;
-                }
-                
-                if (resultCC == null) {
-                    assertNull(resultSC);
-                } else {
-                    assertNotNull(resultSC);
-                    assertEquals(resultCC.getClass(), resultSC.getClass());
-                }
-            }
+    private static String toGetterNameToSettingNameCase(String name) {
+        int idx = 0;
+        while (idx < name.length() && Character.isUpperCase(name.charAt(idx))) {
+            idx++;
         }
-    }
-    
-    @Test
-    public void testGetSupportedBuiltInDirectiveNames() {
-        Configuration cfg = new Builder(VERSION_3_0_0).build();
-        
-        Set<String> allNames = cfg.getSupportedBuiltInDirectiveNames(NamingConvention.AUTO_DETECT);
-        Set<String> lNames = cfg.getSupportedBuiltInDirectiveNames(NamingConvention.LEGACY);
-        Set<String> cNames = cfg.getSupportedBuiltInDirectiveNames(NamingConvention.CAMEL_CASE);
-        
-        checkNamingConventionNameSets(allNames, lNames, cNames);
-        
-        for (String name : cNames) {
-            assertThat(name.toLowerCase(), isIn(lNames));
+        String result =
+                idx == 0 ? name
+                : idx == 1 ? Character.toLowerCase(name.charAt(0)) + name.substring(1)
+                : name.substring(0, idx - 1).toLowerCase() + name.substring(idx - 1); // "FOOBar" -> "fooBar"
+        if (result.equals("templateUpdateDelayMilliseconds")) {
+            result = "templateUpdateDelay";
         }
-    }
 
-    @Test
-    public void testGetSupportedBuiltInNames() {
-        Configuration cfg = new Builder(VERSION_3_0_0).build();
-        
-        Set<String> allNames = cfg.getSupportedBuiltInNames(NamingConvention.AUTO_DETECT);
-        Set<String> lNames = cfg.getSupportedBuiltInNames(NamingConvention.LEGACY);
-        Set<String> cNames = cfg.getSupportedBuiltInNames(NamingConvention.CAMEL_CASE);
-        
-        checkNamingConventionNameSets(allNames, lNames, cNames);
+        return result;
     }
 
-    private void checkNamingConventionNameSets(Set<String> allNames, Set<String> lNames, Set<String> cNames) {
-        for (String name : lNames) {
-            assertThat(allNames, hasItem(name));
-            assertTrue("Should be all-lowercase: " + name, name.equals(name.toLowerCase()));
-        }
-        for (String name : cNames) {
-            assertThat(allNames, hasItem(name));
-        }
-        for (String name : allNames) {
-            assertThat(name, anyOf(isIn(lNames), isIn(cNames)));
+    @Test
+    public void testGetSettingNamesCorrespondToStaticKeyFields() throws Exception {
+        testGetSettingNamesCorrespondToStaticKeyFields(
+                Configuration.Builder.getSettingNames(),
+                Configuration.Builder.class);
+    }
+
+    public static void testGetSettingNamesCorrespondToStaticKeyFields(Set<String> names, Class<?> cfgClass) throws
+            Exception {
+        Set<String> uncoveredNames = new HashSet<>(names);
+        for (Field f : cfgClass.getFields()) {
+            if (f.getName().endsWith("_KEY")) {
+                final String name = (String) f.get(null);
+                assertTrue("Missing setting name: " + name, names.contains(name));
+                uncoveredNames.remove(name);
+            }
         }
-        assertEquals(lNames.size(), cNames.size());
+        assertEquals("Some setting names aren't covered by the ..._KEY constants.",
+                Collections.emptySet(), uncoveredNames);
     }
-    
+
     @Test
     public void testRemovedSettings() {
         Builder cfgB = new Builder(VERSION_3_0_0);
@@ -978,17 +935,6 @@ public class ConfigurationTest {
         }
     }
 
-    private boolean keyFieldExists(String name) throws Exception {
-        Field field;
-        try {
-            field = ExtendableBuilder.class.getField(name.toUpperCase() + "_KEY");
-        } catch (NoSuchFieldException e) {
-            return false;
-        }
-        assertEquals(name, field.get(null));
-        return true;
-    }
-    
     private static class MyScalarModel implements TemplateScalarModel {
 
         @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/CustomTemplateResolverTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CustomTemplateResolverTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CustomTemplateResolverTest.java
index 640dd71..426a96b 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CustomTemplateResolverTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CustomTemplateResolverTest.java
@@ -79,7 +79,6 @@ public class CustomTemplateResolverTest {
         assertNotNull(cfg.getLocalizedTemplateLookup());
         assertNotNull(cfg.getTemplateCacheStorage());
         assertNotNull(cfg.getTemplateUpdateDelayMilliseconds());
-        assertNotNull(cfg.getNamingConvention());
 
         assertNull(cfg.getTemplateLoader());
         assertNull(cfg.getTemplateConfigurations());
@@ -111,14 +110,13 @@ public class CustomTemplateResolverTest {
     @Test
     public void testConfigurationDefaultForCustomTemplateResolver2() {
         Configuration cfg = new Configuration.Builder(Configuration.VERSION_3_0_0)
-                .templateResolver(new CustomTemplateResolver(NAMING_CONVENTION_KEY))
+                .templateResolver(new CustomTemplateResolver(null))
                 .build();
 
         assertNull(cfg.getTemplateLookupStrategy());
         assertNull(cfg.getLocalizedTemplateLookup());
         assertNull(cfg.getTemplateCacheStorage());
         assertNull(cfg.getTemplateUpdateDelayMilliseconds());
-        assertNotNull(cfg.getNamingConvention()); //!
 
         assertNull(cfg.getTemplateLoader());
         assertNull(cfg.getTemplateConfigurations());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
index 4ad5937..9cd835b 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
@@ -162,9 +162,9 @@ public class DateFormatTest extends TemplateTest {
                 .dateTimeFormat("[wrong dt]")
                 .timeFormat("[wrong t]")
                 .build());
-        assertErrorContains("${.now?date}", "\"date_format\"", "[wrong d]");
-        assertErrorContains("${.now?datetime}", "\"datetime_format\"", "[wrong dt]");
-        assertErrorContains("${.now?time}", "\"time_format\"", "[wrong t]");
+        assertErrorContains("${.now?date}", "\"dateFormat\"", "[wrong d]");
+        assertErrorContains("${.now?datetime}", "\"dateTimeFormat\"", "[wrong dt]");
+        assertErrorContains("${.now?time}", "\"timeFormat\"", "[wrong t]");
     }
 
     @Test
@@ -178,7 +178,7 @@ public class DateFormatTest extends TemplateTest {
         
         assertErrorContains("${d?string.@div_xyz}", "\"@div_xyz\"", "\"xyz\"");
         setConfigurationWithDateTimeFormat("@div");
-        assertErrorContains("${d}", "\"datetime_format\"", "\"@div\"", "format parameter is required");
+        assertErrorContains("${d}", "\"dateTimeFormat\"", "\"@div\"", "format parameter is required");
     }
     
     @Test
@@ -187,7 +187,7 @@ public class DateFormatTest extends TemplateTest {
             setConfigurationWithDateTimeFormat("@noSuchFormat");
             Throwable exc = assertErrorContains(
                     "${.now}",
-                    "\"@noSuchFormat\"", "\"noSuchFormat\"", "\"datetime_format\"");
+                    "\"@noSuchFormat\"", "\"noSuchFormat\"", "\"dateTimeFormat\"");
             assertThat(exc.getCause(), instanceOf(UndefinedCustomFormatException.class));
             
         }
@@ -195,13 +195,13 @@ public class DateFormatTest extends TemplateTest {
             setConfiguration(createConfigurationBuilder().dateFormat("@noSuchFormatD").build());
             assertErrorContains(
                     "${.now?date}",
-                    "\"@noSuchFormatD\"", "\"noSuchFormatD\"", "\"date_format\"");
+                    "\"@noSuchFormatD\"", "\"noSuchFormatD\"", "\"dateFormat\"");
         }
         {
             setConfiguration(createConfigurationBuilder().timeFormat("@noSuchFormatT").build());
             assertErrorContains(
                     "${.now?time}",
-                    "\"@noSuchFormatT\"", "\"noSuchFormatT\"", "\"time_format\"");
+                    "\"@noSuchFormatT\"", "\"noSuchFormatT\"", "\"timeFormat\"");
         }
 
         {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
index ff5897f..8b4b2d5 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
@@ -34,8 +34,8 @@ public class InterpretAndEvalTemplateNameTest extends TemplateTest {
     @Test
     public void testInterpret() throws IOException, TemplateException {
         for (String getTemplateNames : new String[] {
-                "c=${.current_template_name}, m=${.main_template_name}",
-                "c=${\".current_template_name\"?eval}, m=${\".main_template_name\"?eval}"
+                "c=${.currentTemplateName}, m=${.mainTemplateName}",
+                "c=${\".currentTemplateName\"?eval}, m=${\".mainTemplateName\"?eval}"
                 }) {
             StringTemplateLoader tl = new StringTemplateLoader();
             tl.putTemplate(

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableParsingAndProcessingConfigurationTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableParsingAndProcessingConfigurationTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableParsingAndProcessingConfigurationTest.java
index 2e96c18..54ce6b1 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableParsingAndProcessingConfigurationTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableParsingAndProcessingConfigurationTest.java
@@ -22,11 +22,9 @@ package org.apache.freemarker.core;
 import static org.hamcrest.Matchers.*;
 import static org.junit.Assert.*;
 
-import java.lang.reflect.Field;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -55,19 +53,13 @@ public class MutableParsingAndProcessingConfigurationTest {
         cfgB.setAutoEscapingPolicy(AutoEscapingPolicy.DISABLE);
         assertEquals(AutoEscapingPolicy.DISABLE, cfgB.getAutoEscapingPolicy());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE, "enableIfSupported");
+        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY, "enableIfSupported");
         assertEquals(AutoEscapingPolicy.ENABLE_IF_SUPPORTED, cfgB.getAutoEscapingPolicy());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE, "enable_if_supported");
-        assertEquals(AutoEscapingPolicy.ENABLE_IF_SUPPORTED, cfgB.getAutoEscapingPolicy());
-
-        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE, "enableIfDefault");
-        assertEquals(AutoEscapingPolicy.ENABLE_IF_DEFAULT, cfgB.getAutoEscapingPolicy());
-
-        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE, "enable_if_default");
+        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY, "enableIfDefault");
         assertEquals(AutoEscapingPolicy.ENABLE_IF_DEFAULT, cfgB.getAutoEscapingPolicy());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE, "disable");
+        cfgB.setSetting(Configuration.ExtendableBuilder.AUTO_ESCAPING_POLICY_KEY, "disable");
         assertEquals(AutoEscapingPolicy.DISABLE, cfgB.getAutoEscapingPolicy());
     }
 
@@ -87,10 +79,10 @@ public class MutableParsingAndProcessingConfigurationTest {
 
         assertFalse(cfgB.isOutputFormatSet());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY_CAMEL_CASE, XMLOutputFormat.class.getSimpleName());
+        cfgB.setSetting(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY, XMLOutputFormat.class.getSimpleName());
         assertEquals(XMLOutputFormat.INSTANCE, cfgB.getOutputFormat());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY_SNAKE_CASE, HTMLOutputFormat.class.getSimpleName());
+        cfgB.setSetting(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY, HTMLOutputFormat.class.getSimpleName());
         assertEquals(HTMLOutputFormat.INSTANCE, cfgB.getOutputFormat());
 
         cfgB.unsetOutputFormat();
@@ -99,7 +91,7 @@ public class MutableParsingAndProcessingConfigurationTest {
 
         cfgB.setOutputFormat(UndefinedOutputFormat.INSTANCE);
         assertTrue(cfgB.isOutputFormatSet());
-        cfgB.setSetting(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY_CAMEL_CASE, "default");
+        cfgB.setSetting(Configuration.ExtendableBuilder.OUTPUT_FORMAT_KEY, "default");
         assertFalse(cfgB.isOutputFormatSet());
 
         try {
@@ -128,11 +120,11 @@ public class MutableParsingAndProcessingConfigurationTest {
         assertTrue(cfgB.getRecognizeStandardFileExtensions());
         assertTrue(cfgB.isRecognizeStandardFileExtensionsSet());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE, "false");
+        cfgB.setSetting(Configuration.ExtendableBuilder.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY, "false");
         assertFalse(cfgB.getRecognizeStandardFileExtensions());
         assertTrue(cfgB.isRecognizeStandardFileExtensionsSet());
 
-        cfgB.setSetting(Configuration.ExtendableBuilder.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE, "default");
+        cfgB.setSetting(Configuration.ExtendableBuilder.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY, "default");
         assertTrue(cfgB.getRecognizeStandardFileExtensions());
         assertFalse(cfgB.isRecognizeStandardFileExtensionsSet());
     }
@@ -176,13 +168,13 @@ public class MutableParsingAndProcessingConfigurationTest {
     public void testTabSizeSetting() throws Exception {
         Configuration.Builder cfgB = new Configuration.Builder(Configuration.VERSION_3_0_0);
         assertEquals(8, cfgB.getTabSize());
-        cfgB.setSetting(Configuration.ExtendableBuilder.TAB_SIZE_KEY_CAMEL_CASE, "4");
+        cfgB.setSetting(Configuration.ExtendableBuilder.TAB_SIZE_KEY, "4");
         assertEquals(4, cfgB.getTabSize());
-        cfgB.setSetting(Configuration.ExtendableBuilder.TAB_SIZE_KEY_SNAKE_CASE, "1");
+        cfgB.setSetting(Configuration.ExtendableBuilder.TAB_SIZE_KEY, "1");
         assertEquals(1, cfgB.getTabSize());
 
         try {
-            cfgB.setSetting(Configuration.ExtendableBuilder.TAB_SIZE_KEY_SNAKE_CASE, "x");
+            cfgB.setSetting(Configuration.ExtendableBuilder.TAB_SIZE_KEY, "x");
             fail();
         } catch (ConfigurationException e) {
             assertThat(e.getCause(), instanceOf(NumberFormatException.class));
@@ -190,28 +182,12 @@ public class MutableParsingAndProcessingConfigurationTest {
     }
 
     @Test
-    public void testNamingConventionSetSetting() throws ConfigurationException {
-        Configuration.Builder cfg = new Configuration.Builder(Configuration.VERSION_3_0_0);
-
-        assertEquals(NamingConvention.AUTO_DETECT, cfg.getNamingConvention());
-
-        cfg.setSetting("naming_convention", "legacy");
-        assertEquals(NamingConvention.LEGACY, cfg.getNamingConvention());
-
-        cfg.setSetting("naming_convention", "camel_case");
-        assertEquals(NamingConvention.CAMEL_CASE, cfg.getNamingConvention());
-
-        cfg.setSetting("naming_convention", "auto_detect");
-        assertEquals(NamingConvention.AUTO_DETECT, cfg.getNamingConvention());
-    }
-
-    @Test
     public void testLazyImportsSetSetting() throws ConfigurationException {
         Configuration.Builder cfgB = new Configuration.Builder(Configuration.VERSION_3_0_0);
 
         assertFalse(cfgB.getLazyImports());
         assertFalse(cfgB.isLazyImportsSet());
-        cfgB.setSetting("lazy_imports", "true");
+        cfgB.setSetting("lazyImports", "true");
         assertTrue(cfgB.getLazyImports());
         cfgB.setSetting("lazyImports", "false");
         assertFalse(cfgB.getLazyImports());
@@ -224,7 +200,7 @@ public class MutableParsingAndProcessingConfigurationTest {
 
         assertNull(cfgB.getLazyAutoImports());
         assertFalse(cfgB.isLazyAutoImportsSet());
-        cfgB.setSetting("lazy_auto_imports", "true");
+        cfgB.setSetting("lazyAutoImports", "true");
         assertEquals(Boolean.TRUE, cfgB.getLazyAutoImports());
         assertTrue(cfgB.isLazyAutoImportsSet());
         cfgB.setSetting("lazyAutoImports", "false");
@@ -304,8 +280,8 @@ public class MutableParsingAndProcessingConfigurationTest {
     @Test
     public void testGetSettingNamesAreSorted() throws Exception {
         for (boolean camelCase : new boolean[] { false, true }) {
-            List<String> names = new ArrayList<>(MutableParsingAndProcessingConfiguration.getSettingNames(camelCase));
-            List<String> inheritedNames = new ArrayList<>(MutableProcessingConfiguration.getSettingNames(camelCase));
+            List<String> names = new ArrayList<>(MutableParsingAndProcessingConfiguration.getSettingNames());
+            List<String> inheritedNames = new ArrayList<>(MutableProcessingConfiguration.getSettingNames());
             assertStartsWith(names, inheritedNames);
 
             String prevName = null;
@@ -320,39 +296,16 @@ public class MutableParsingAndProcessingConfigurationTest {
     }
 
     @Test
-    public void testGetSettingNamesNameConventionsContainTheSame() throws Exception {
-        MutableProcessingConfigurationTest.testGetSettingNamesNameConventionsContainTheSame(
-                new ArrayList<>(MutableParsingAndProcessingConfiguration.getSettingNames(false)),
-                new ArrayList<>(MutableParsingAndProcessingConfiguration.getSettingNames(true)));
-    }
-
-    @Test
-    public void testStaticFieldKeysCoverAllGetSettingNames() throws Exception {
-        List<String> names = new ArrayList<>(MutableParsingAndProcessingConfiguration.getSettingNames(false));
-        for (String name :  names) {
-            assertTrue("No field was found for " + name, keyFieldExists(name));
-        }
-    }
-
-    @Test
-    public void testGetSettingNamesCoversAllStaticKeyFields() throws Exception {
-        Collection<String> names = MutableParsingAndProcessingConfiguration.getSettingNames(false);
-
-        for (Class<?> cfgableClass : new Class[] {
-                MutableParsingAndProcessingConfiguration.class,
-                MutableProcessingConfiguration.class }) {
-            for (Field f : cfgableClass.getFields()) {
-                if (f.getName().endsWith("_KEY")) {
-                    final String name = (String) f.get(null);
-                    assertTrue("Missing setting name: " + name, names.contains(name));
-                }
-            }
-        }
+    public void testAllSettingsAreCoveredByMutableSettingsObject() throws Exception {
+        ConfigurationTest.testAllSettingsAreCoveredByMutableSettingsObject(
+                ParsingAndProcessingConfiguration.class,
+                MutableParsingAndProcessingConfiguration.class);
     }
 
     @Test
-    public void testKeyStaticFieldsHasAllVariationsAndCorrectFormat() throws IllegalArgumentException, IllegalAccessException {
-        MutableProcessingConfigurationTest.testKeyStaticFieldsHasAllVariationsAndCorrectFormat(
+    public void testGetSettingNamesCorrespondToStaticKeyFields() throws Exception {
+        ConfigurationTest.testGetSettingNamesCorrespondToStaticKeyFields(
+                MutableParsingAndProcessingConfiguration.getSettingNames(),
                 MutableParsingAndProcessingConfiguration.class);
     }
 
@@ -366,15 +319,4 @@ public class MutableParsingAndProcessingConfigurationTest {
         }
     }
 
-    private boolean keyFieldExists(String name) throws Exception {
-        Field field;
-        try {
-            field = MutableParsingAndProcessingConfiguration.class.getField(name.toUpperCase() + "_KEY");
-        } catch (NoSuchFieldException e) {
-            return false;
-        }
-        assertEquals(name, field.get(null));
-        return true;
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
index 4295e17..5db5dd9 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
@@ -24,15 +24,12 @@ import static org.junit.Assert.*;
 
 import java.io.IOException;
 import java.io.StringWriter;
-import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.TimeZone;
 
 import org.apache.freemarker.core.userpkg.BaseNTemplateNumberFormatFactory;
@@ -42,7 +39,6 @@ import org.apache.freemarker.core.userpkg.HexTemplateNumberFormatFactory;
 import org.apache.freemarker.core.util._CollectionUtil;
 import org.apache.freemarker.core.util._DateUtil;
 import org.apache.freemarker.core.util._NullWriter;
-import org.apache.freemarker.core.util._StringUtil;
 import org.apache.freemarker.core.valueformat.TemplateDateFormatFactory;
 import org.apache.freemarker.core.valueformat.TemplateNumberFormatFactory;
 import org.junit.Test;
@@ -55,140 +51,28 @@ public class MutableProcessingConfigurationTest {
 
     @Test
     public void testGetSettingNamesAreSorted() throws Exception {
-        MutableProcessingConfiguration mpc = createMutableProcessingConfiguration();
-        for (boolean camelCase : new boolean[] { false, true }) {
-            Collection<String> names = mpc.getSettingNames(camelCase);
-            String prevName = null;
-            for (String name : names) {
-                if (prevName != null) {
-                    assertThat(name, greaterThan(prevName));
-                }
-                prevName = name;
-            }
-        }
-    }
-
-    @Test
-    public void testStaticFieldKeysCoverAllGetSettingNames() throws Exception {
-        MutableProcessingConfiguration mpc = createMutableProcessingConfiguration();
-        Collection<String> names = mpc.getSettingNames(false);
+        Collection<String> names = MutableProcessingConfiguration.getSettingNames();
+        String prevName = null;
         for (String name : names) {
-                assertTrue("No field was found for " + name, keyFieldExists(name));
-        }
-    }
-    
-    @Test
-    public void testGetSettingNamesCoversAllStaticKeyFields() throws Exception {
-        MutableProcessingConfiguration mpc = createMutableProcessingConfiguration();
-        Collection<String> names = mpc.getSettingNames(false);
-        
-        for (Field f : MutableProcessingConfiguration.class.getFields()) {
-            if (f.getName().endsWith("_KEY")) {
-                final Object name = f.get(null);
-                assertTrue("Missing setting name: " + name, names.contains(name));
+            if (prevName != null) {
+                assertThat(name, greaterThan(prevName));
             }
+            prevName = name;
         }
     }
 
     @Test
-    public void testKeyStaticFieldsHasAllVariationsAndCorrectFormat() throws IllegalArgumentException, IllegalAccessException {
-        MutableProcessingConfigurationTest.testKeyStaticFieldsHasAllVariationsAndCorrectFormat(MutableProcessingConfiguration.class);
-    }
-    
-    @Test
-    public void testGetSettingNamesNameConventionsContainTheSame() throws Exception {
-        MutableProcessingConfiguration mpc = createMutableProcessingConfiguration();
-        MutableProcessingConfigurationTest.testGetSettingNamesNameConventionsContainTheSame(
-                new ArrayList<>(mpc.getSettingNames(false)),
-                new ArrayList<>(mpc.getSettingNames(true)));
-    }
-
-    public static void testKeyStaticFieldsHasAllVariationsAndCorrectFormat(
-            Class<? extends MutableProcessingConfiguration> confClass) throws IllegalArgumentException, IllegalAccessException {
-        // For all _KEY fields there must be a _KEY_CAMEL_CASE and a _KEY_SNAKE_CASE field.
-        // Their content must not contradict the expected naming convention.
-        // They _KEY filed value must be deducable from the field name
-        // The _KEY value must be the same as _KEY_SNAKE_CASE field.
-        // The _KEY_CAMEL_CASE converted to snake case must give the value of the _KEY_SNAKE_CASE.
-        for (Field field : confClass.getFields()) {
-            String fieldName = field.getName();
-            if (fieldName.endsWith("_KEY")) {
-                String keyFieldValue = (String) field.get(null);
-                assertNotEquals(NamingConvention.CAMEL_CASE,
-                        _StringUtil.getIdentifierNamingConvention(keyFieldValue));
-                assertEquals(fieldName.substring(0, fieldName.length() - 4).toLowerCase(), keyFieldValue);
-                
-                try {
-                    String keySCFieldValue = (String) confClass.getField(fieldName + "_SNAKE_CASE").get(null);
-                    assertEquals(keyFieldValue, keySCFieldValue);
-                } catch (NoSuchFieldException e) {
-                    fail("Missing ..._SNAKE_CASE field for " + fieldName);
-                }
-                
-                try {
-                    String keyCCFieldValue = (String) confClass.getField(fieldName + "_CAMEL_CASE").get(null);
-                    assertNotEquals(NamingConvention.LEGACY,
-                            _StringUtil.getIdentifierNamingConvention(keyCCFieldValue));
-                    assertEquals(keyFieldValue, _StringUtil.camelCaseToUnderscored(keyCCFieldValue));
-                } catch (NoSuchFieldException e) {
-                    fail("Missing ..._CAMEL_CASE field for " + fieldName);
-                }
-            }
-        }
-        
-        // For each _KEY_SNAKE_CASE field there must be a _KEY field.
-        for (Field field : confClass.getFields()) {
-            String fieldName = field.getName();
-            if (fieldName.endsWith("_KEY_SNAKE_CASE")) {
-                try {
-                    confClass.getField(fieldName.substring(0, fieldName.length() - 11)).get(null);
-                } catch (NoSuchFieldException e) {
-                    fail("Missing ..._KEY field for " + fieldName);
-                }
-            }
-        }
-        
-        // For each _KEY_CAMEL_CASE field there must be a _KEY field.
-        for (Field field : confClass.getFields()) {
-            String fieldName = field.getName();
-            if (fieldName.endsWith("_KEY_CAMEL_CASE")) {
-                try {
-                    confClass.getField(fieldName.substring(0, fieldName.length() - 11)).get(null);
-                } catch (NoSuchFieldException e) {
-                    fail("Missing ..._KEY field for " + fieldName);
-                }
-            }
-        }
-    }
-    
-    public static void testGetSettingNamesNameConventionsContainTheSame(List<String> namesSCList, List<String> namesCCList) {
-        Set<String> namesSC = new HashSet<>(namesSCList);
-        assertEquals(namesSCList.size(), namesSC.size());
-        
-        Set<String> namesCC = new HashSet<>(namesCCList);
-        assertEquals(namesCCList.size(), namesCC.size());
-
-        assertEquals(namesSC.size(), namesCC.size());
-        
-        for (String nameCC : namesCC) {
-            final String nameSC = _StringUtil.camelCaseToUnderscored(nameCC);
-            if (!namesSC.contains(nameSC)) {
-                fail("\"" + nameCC + "\" misses corresponding snake case name, \"" + nameSC + "\".");
-            }
-        }
-    }
-
-    private MutableProcessingConfiguration createMutableProcessingConfiguration() throws IOException {
-        return new TemplateConfiguration.Builder();
+    public void testAllSettingsAreCoveredByMutableSettingsObject() throws Exception {
+        ConfigurationTest.testAllSettingsAreCoveredByMutableSettingsObject(
+                ProcessingConfiguration.class,
+                MutableProcessingConfiguration.class);
     }
 
-    private boolean keyFieldExists(String name) throws Exception {
-        try {
-            MutableProcessingConfiguration.class.getField(name.toUpperCase() + "_KEY");
-        } catch (NoSuchFieldException e) {
-            return false;
-        }
-        return true;
+    @Test
+    public void testGetSettingNamesCorrespondToStaticKeyFields() throws Exception {
+        ConfigurationTest.testGetSettingNamesCorrespondToStaticKeyFields(
+                MutableProcessingConfiguration.getSettingNames(),
+                MutableProcessingConfiguration.class);
     }
 
     @Test
@@ -443,13 +327,13 @@ public class MutableProcessingConfigurationTest {
             assertThat(e.getMessage(), containsString("@wrong"));
         }
 
-        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_NUMBER_FORMATS_KEY_CAMEL_CASE,
+        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_NUMBER_FORMATS_KEY,
                 "{ 'base': " + BaseNTemplateNumberFormatFactory.class.getName() + "() }");
         assertEquals(
                 Collections.singletonMap("base", BaseNTemplateNumberFormatFactory.INSTANCE),
                 cfgB.getCustomNumberFormats());
 
-        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_NUMBER_FORMATS_KEY_SNAKE_CASE,
+        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_NUMBER_FORMATS_KEY,
                 "{ "
                         + "'base': " + BaseNTemplateNumberFormatFactory.class.getName() + "(), "
                         + "'hex': " + HexTemplateNumberFormatFactory.class.getName() + "()"
@@ -464,7 +348,7 @@ public class MutableProcessingConfigurationTest {
         assertEquals(Collections.emptyMap(), cfgB.getCustomNumberFormats());
 
         try {
-            cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_NUMBER_FORMATS_KEY_CAMEL_CASE,
+            cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_NUMBER_FORMATS_KEY,
                     "{ 'x': " + EpochMillisTemplateDateFormatFactory.class.getName() + "() }");
             fail();
         } catch (ConfigurationException e) {
@@ -519,13 +403,13 @@ public class MutableProcessingConfigurationTest {
             assertThat(e.getMessage(), containsString("@wrong"));
         }
 
-        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_DATE_FORMATS_KEY_CAMEL_CASE,
+        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_DATE_FORMATS_KEY,
                 "{ 'epoch': " + EpochMillisTemplateDateFormatFactory.class.getName() + "() }");
         assertEquals(
                 Collections.singletonMap("epoch", EpochMillisTemplateDateFormatFactory.INSTANCE),
                 cfgB.getCustomDateFormats());
 
-        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_DATE_FORMATS_KEY_SNAKE_CASE,
+        cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_DATE_FORMATS_KEY,
                 "{ "
                         + "'epoch': " + EpochMillisTemplateDateFormatFactory.class.getName() + "(), "
                         + "'epochDiv': " + EpochMillisDivTemplateDateFormatFactory.class.getName() + "()"
@@ -540,7 +424,7 @@ public class MutableProcessingConfigurationTest {
         assertEquals(Collections.emptyMap(), cfgB.getCustomDateFormats());
 
         try {
-            cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_DATE_FORMATS_KEY_CAMEL_CASE,
+            cfgB.setSetting(MutableProcessingConfiguration.CUSTOM_DATE_FORMATS_KEY,
                     "{ 'x': " + HexTemplateNumberFormatFactory.class.getName() + "() }");
             fail();
         } catch (ConfigurationException e) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/51dba882/freemarker-core-test/src/test/java/org/apache/freemarker/core/ObjectBuilderSettingsTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ObjectBuilderSettingsTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ObjectBuilderSettingsTest.java
index b02a736..f93d9ce 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ObjectBuilderSettingsTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ObjectBuilderSettingsTest.java
@@ -395,7 +395,7 @@ public class ObjectBuilderSettingsTest {
             props.setProperty(Configuration.ExtendableBuilder.TEMPLATE_CACHE_STORAGE_KEY,
                     "soft: 500, strong: 100");
             props.setProperty(MutableProcessingConfiguration.NEW_BUILTIN_CLASS_RESOLVER_KEY,
-                    "allow_nothing");
+                    "allowNothing");
             cfgB.setSettings(props);
             assertEquals(DefaultObjectWrapper.class, cfgB.getObjectWrapper().getClass());
             assertEquals(1, ((DummyArithmeticEngine) cfgB.getArithmeticEngine()).getX());