freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [9/9] incubator-freemarker git commit: Removed support for incompatibleImprovements below 3.0.0.
Date Mon, 20 Feb 2017 10:14:32 GMT
Removed support for incompatibleImprovements below 3.0.0.


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

Branch: refs/heads/3
Commit: 8ba7883e52c4fc842f9fd0b09ec1fcc8ffafb30f
Parents: 410fd0d
Author: ddekany <ddekany@apache.org>
Authored: Sat Feb 18 01:43:39 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Mon Feb 20 11:11:34 2017 +0100

----------------------------------------------------------------------
 .../apache/freemarker/core/Configuration.java   | 359 +---------------
 .../org/apache/freemarker/core/Template.java    |   9 +-
 .../apache/freemarker/core/_TemplateAPI.java    |  30 +-
 .../ast/APINotSupportedTemplateException.java   |   5 -
 .../org/apache/freemarker/core/ast/BuiltIn.java |   6 -
 .../freemarker/core/ast/BuiltInsForDates.java   |   6 +-
 .../core/ast/BuiltInsForMultipleTypes.java      |  43 +-
 .../core/ast/BuiltInsForStringsEncoding.java    |  22 +-
 .../freemarker/core/ast/BuiltinVariable.java    |   9 +-
 .../freemarker/core/ast/Configurable.java       |  26 +-
 .../freemarker/core/ast/DynamicKeyName.java     |  10 +-
 .../apache/freemarker/core/ast/Environment.java |  43 +-
 .../apache/freemarker/core/ast/HashLiteral.java |  39 +-
 .../freemarker/core/ast/ICIChainMember.java     |  41 --
 .../apache/freemarker/core/ast/Interpret.java   |   2 +-
 .../NonListableRightUnboundedRangeModel.java    |  40 --
 .../org/apache/freemarker/core/ast/Range.java   |   5 +-
 .../core/ast/TemplateConfiguration.java         |   7 -
 .../core/ast/_SettingEvaluationEnvironment.java |   2 +-
 .../core/model/TemplateHashModelEx2.java        |   2 +-
 .../core/model/impl/DefaultObjectWrapper.java   |  10 +-
 .../impl/DefaultObjectWrapperConfiguration.java |   7 +-
 .../core/model/impl/_StaticObjectWrappers.java  |   6 +-
 .../core/model/impl/beans/ArgumentTypes.java    | 416 ++++++++-----------
 .../core/model/impl/beans/BeanModel.java        |   8 +-
 .../core/model/impl/beans/BeansWrapper.java     |  75 +---
 .../model/impl/beans/BeansWrapperBuilder.java   |   2 +-
 .../impl/beans/BeansWrapperConfiguration.java   |   2 +-
 .../model/impl/beans/ClassIntrospector.java     |   6 +-
 .../impl/beans/ClassIntrospectorBuilder.java    |  15 +-
 .../impl/beans/OverloadedFixArgsMethods.java    |  18 +-
 .../model/impl/beans/OverloadedMethods.java     |  16 +-
 .../impl/beans/OverloadedMethodsSubset.java     | 168 ++++----
 .../impl/beans/OverloadedVarArgsMethods.java    |  22 +-
 .../core/model/impl/beans/StaticModel.java      |   2 +-
 .../core/model/impl/beans/_BeansAPI.java        |   2 +-
 .../core/model/impl/beans/_MethodUtil.java      |   1 +
 .../impl/DefaultTemplateNameFormat.java         |   2 +-
 .../impl/DefaultTemplateResolver.java           |  36 +-
 .../freemarker/servlet/InitParamParser.java     |  12 +-
 .../servlet/jsp/FreeMarkerPageContext.java      |   8 +-
 src/main/javacc/FTL.jj                          | 129 +++---
 src/manual/en_US/FM3-CHANGE-LOG.txt             |   6 +-
 .../freemarker/core/ConfigurationTest.java      | 237 ++++-------
 .../freemarker/core/CustomAttributeTest.java    |  20 +-
 .../apache/freemarker/core/ExceptionTest.java   |   6 +-
 .../apache/freemarker/core/GetSourceTest.java   |   5 +-
 .../core/MistakenlyPublicImportAPIsTest.java    |  10 +-
 .../core/MistakenlyPublicMacroAPIsTest.java     |   7 +-
 .../freemarker/core/SimpleObjetWrapperTest.java |  40 +-
 .../core/TemplateConstructorsTest.java          |  11 +-
 .../core/TemplateLanguageVersionTest.java       |  17 +-
 .../core/TemplateLookupStrategyTest.java        |  19 +-
 .../core/TemplateNotFoundMessageTest.java       |  19 +-
 .../core/ast/ASTBasedErrorMessagesTest.java     |   5 -
 .../apache/freemarker/core/ast/ASTPrinter.java  |   3 +-
 .../freemarker/core/ast/BreakPlacementTest.java |   6 +-
 .../freemarker/core/ast/CanonicalFormTest.java  |   3 +-
 .../freemarker/core/ast/ConfigurableTest.java   |  11 +-
 .../freemarker/core/ast/DateFormatTest.java     |  39 +-
 .../core/ast/DirectiveCallPlaceTest.java        |   6 +-
 .../core/ast/EncodingOverrideTest.java          |   4 +-
 .../core/ast/EnvironmentCustomStateTest.java    |   6 +-
 .../ast/EnvironmentGetTemplateVariantsTest.java | 114 +++--
 .../freemarker/core/ast/HeaderParsingTest.java  |   4 +-
 .../IncludeAndImportConfigurableLayersTest.java |   5 +-
 .../core/ast/IncludeAndImportTest.java          |  11 +-
 .../freemarker/core/ast/IteratorIssuesTest.java |  86 +---
 .../freemarker/core/ast/NumberFormatTest.java   |  34 +-
 .../core/ast/ObjectBuilderSettingsTest.java     |  41 +-
 .../freemarker/core/ast/OutputFormatTest.java   |  71 +---
 .../core/ast/ParsingErrorMessagesTest.java      |   5 +-
 .../freemarker/core/ast/SQLTimeZoneTest.java    |   5 +-
 .../core/ast/SpecialVariableTest.java           |  10 +-
 .../ast/StringLiteralInterpolationTest.java     |   5 +-
 .../apache/freemarker/core/ast/TabSizeTest.java |   5 +-
 .../core/ast/TagSyntaxVariationsTest.java       |  84 +---
 .../core/ast/TemplatGetEncodingTest.java        |   3 +-
 .../core/ast/TemplateConfigurationTest.java     |  76 ++--
 ...teConfigurationWithTemplateResolverTest.java |  15 +-
 .../core/ast/TemplateLevelSettings.java         |  15 +-
 .../ast/TemplateNameSpecialVariablesTest.java   |  86 ++--
 .../core/ast/TheadInterruptingSupportTest.java  |   4 +-
 .../core/ast/UnclosedCommentTest.java           |  43 +-
 .../core/ast/WhitespaceStrippingTest.java       |   5 +-
 .../model/impl/DefaultObjectWrapperTest.java    | 416 +++++--------------
 .../impl/beans/BeansAPINewInstanceTest.java     |   9 +-
 .../model/impl/beans/BeansWrapperBasics.java    |  15 +-
 .../core/model/impl/beans/BeansWrapperDesc.java |  30 ++
 .../impl/beans/BeansWrapperDesc2003020.java     |  30 --
 .../impl/beans/BeansWrapperDesc2003021.java     |  30 --
 .../core/model/impl/beans/BeansWrapperInc.java  |  30 ++
 .../impl/beans/BeansWrapperInc2003020.java      |  30 --
 .../impl/beans/BeansWrapperInc2003021.java      |  30 --
 .../impl/beans/BeansWrapperSingletonsTest.java  | 174 +++-----
 .../CommonSupertypeForUnwrappingHintTest.java   | 112 ++---
 .../impl/beans/DefaultObjectWrapperDesc.java    |  30 ++
 .../beans/DefaultObjectWrapperDesc2003020.java  |  30 --
 .../beans/DefaultObjectWrapperDesc2003021.java  |  30 --
 .../beans/DefaultObjectWrapperDesc2003022.java  |  30 --
 .../impl/beans/DefaultObjectWrapperInc.java     |  30 ++
 .../beans/DefaultObjectWrapperInc2003020.java   |  30 --
 .../beans/DefaultObjectWrapperInc2003021.java   |  30 --
 .../beans/DefaultObjectWrapperInc2003022.java   |  30 --
 .../core/model/impl/beans/EnumModelsTest.java   |  11 +-
 .../model/impl/beans/ErrorMessagesTest.java     | 126 +++---
 .../core/model/impl/beans/IsApplicableTest.java |  22 +-
 .../impl/beans/MiscNumericalOperationsTest.java |  78 ++--
 .../core/model/impl/beans/ModelCacheTest.java   |  17 +-
 .../beans/ParameterListPreferabilityTest.java   |   8 +-
 .../core/model/impl/beans/StaticModelsTest.java |  13 +-
 .../core/model/impl/beans/TypeFlagsTest.java    |  10 +-
 .../DefaultTemplateResolverTest.java            |  34 +-
 .../FileTemplateLoaderTest.java                 |  10 +-
 .../TemplateConfigurationFactoryTest.java       |  10 +-
 .../TemplateNameFormatTest.java                 |   8 +-
 .../manualtest/GettingStartedExample.java       |   2 +-
 .../servlet/FreemarkerServletTest.java          |   3 +-
 .../servlet/jsp/RealServletContainertTest.java  |  62 ++-
 .../freemarker/servlet/jsp/TLDParsingTest.java  |  11 +-
 .../apache/freemarker/test/TemplateTest.java    |   2 +-
 .../freemarker/test/servlet/WebAppTestCase.java |   6 +-
 .../org/apache/freemarker/test/servlet/web.xml  | 101 -----
 .../test/templatesuite/TemplateTestCase.java    |  11 +-
 .../test/templatesuite/TemplateTestSuite.java   |   6 +-
 .../test/templatesuite/models/Listables.java    |  13 +-
 .../SimpleMapAndCollectionObjectWrapper.java    |  41 ++
 .../core/SimpleObjectWrapperTest.java           |  32 +-
 .../basic/WEB-INF/expected/attributes-2.3.0.txt |  68 ---
 .../expected/attributes-2.3.22-future.txt       |  73 ----
 .../expected/attributes-modernModels.txt        |  73 ++++
 .../servlet/jsp/webapps/basic/WEB-INF/web.xml   |  38 +-
 .../servlet/jsp/webapps/config/WEB-INF/web.xml  |   6 +-
 .../jsp/webapps/multipleLoaders/WEB-INF/web.xml |   2 +-
 .../jsp/webapps/tldDiscovery/WEB-INF/web.xml    |   4 +-
 .../org/apache/freemarker/test/servlet/web.xml  | 101 +++++
 .../expected/encoding-builtins-ici-2.3.20.txt   |  44 --
 .../expected/encoding-builtins.txt              |   4 +-
 .../expected/listhashliteral-ici-2.3.20.txt     |  39 --
 .../expected/listhashliteral-ici-2.3.21.txt     |  36 --
 .../templatesuite/expected/listhashliteral.txt  |  36 ++
 .../expected/type-builtins-ici-2.3.21.txt       |  33 --
 .../expected/type-builtins-ici-2.3.24.txt       |  33 --
 .../templatesuite/expected/type-builtins.txt    |   4 +-
 .../templates/dateformat-iso-bi-common.ftl      | 159 -------
 .../templates/dateformat-iso-bi-ici-2.3.21.ftl  |  23 -
 .../templates/dateformat-iso-bi.ftl             | 146 ++++++-
 .../templatesuite/templates/hashliteral.ftl     |  15 +-
 .../templatesuite/templates/number-format.ftl   |  20 +-
 .../overloaded-methods-2-bwici-2.3.20.ftl       | 285 -------------
 .../overloaded-methods-2-bwici-2.3.21.ftl       | 349 ----------------
 .../templates/overloaded-methods-2-common.ftl   |  89 ----
 .../overloaded-methods-2-desc-bwici-2.3.20.ftl  |  43 --
 .../overloaded-methods-2-inc-bwici-2.3.20.ftl   |  47 ---
 .../templates/overloaded-methods-23bc.ftl       |  69 ---
 .../templates/overloaded-methods.ftl            | 413 ++++++++++++++++++
 .../templates/range-ici-2.3.20.ftl              |  37 --
 .../templates/range-ici-2.3.21.ftl              |  50 ---
 .../test/templatesuite/templates/range.ftl      |  50 +++
 .../templates/string-builtins-ici-2.3.19.ftl    |  22 -
 .../templates/string-builtins-ici-2.3.20.ftl    |  21 -
 .../templates/string-builtins1.ftl              |   2 +-
 .../freemarker/test/templatesuite/testcases.xml | 147 +++----
 163 files changed, 2302 insertions(+), 4938 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/Configuration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/Configuration.java b/src/main/java/org/apache/freemarker/core/Configuration.java
index 73350b6..9538532 100644
--- a/src/main/java/org/apache/freemarker/core/Configuration.java
+++ b/src/main/java/org/apache/freemarker/core/Configuration.java
@@ -22,8 +22,6 @@ package org.apache.freemarker.core;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URLConnection;
-import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.Collections;
@@ -67,24 +65,13 @@ import org.apache.freemarker.core.ast._DelayedJQuote;
 import org.apache.freemarker.core.ast._MiscTemplateException;
 import org.apache.freemarker.core.ast._ObjectBuilderSettingEvaluator;
 import org.apache.freemarker.core.ast._SettingEvaluationEnvironment;
-import org.apache.freemarker.core.util._UnmodifiableCompositeSet;
 import org.apache.freemarker.core.model.ObjectWrapper;
 import org.apache.freemarker.core.model.TemplateHashModelEx;
 import org.apache.freemarker.core.model.TemplateModel;
 import org.apache.freemarker.core.model.TemplateModelException;
 import org.apache.freemarker.core.model.TemplateModelIterator;
 import org.apache.freemarker.core.model.TemplateScalarModel;
-import org.apache.freemarker.core.model.TemplateSequenceModel;
-import org.apache.freemarker.core.model.impl.DefaultObjectWrapper;
 import org.apache.freemarker.core.model.impl.DefaultObjectWrapperBuilder;
-import org.apache.freemarker.core.model.impl.SimpleCollection;
-import org.apache.freemarker.core.model.impl.SimpleDate;
-import org.apache.freemarker.core.model.impl.SimpleHash;
-import org.apache.freemarker.core.model.impl.SimpleObjectWrapper;
-import org.apache.freemarker.core.model.impl.SimpleSequence;
-import org.apache.freemarker.core.model.impl._StaticObjectWrappers;
-import org.apache.freemarker.core.model.impl.beans.BeansWrapper;
-import org.apache.freemarker.core.model.impl.beans.BeansWrapperBuilder;
 import org.apache.freemarker.core.templateresolver.CacheStorage;
 import org.apache.freemarker.core.templateresolver.GetTemplateResult;
 import org.apache.freemarker.core.templateresolver.MalformedTemplateNameException;
@@ -102,18 +89,17 @@ import org.apache.freemarker.core.templateresolver.impl.FileTemplateLoader;
 import org.apache.freemarker.core.templateresolver.impl.MruCacheStorage;
 import org.apache.freemarker.core.templateresolver.impl.MultiTemplateLoader;
 import org.apache.freemarker.core.templateresolver.impl.SoftCacheStorage;
-import org.apache.freemarker.core.templateresolver.impl.URLTemplateLoader;
 import org.apache.freemarker.core.util.CaptureOutput;
-import org.apache.freemarker.core.util._ClassUtil;
-import org.apache.freemarker.core.model.Constants;
 import org.apache.freemarker.core.util.HtmlEscape;
 import org.apache.freemarker.core.util.NormalizeNewlines;
-import org.apache.freemarker.core.util._NullArgumentException;
-import org.apache.freemarker.core.util._SecurityUtil;
 import org.apache.freemarker.core.util.StandardCompress;
-import org.apache.freemarker.core.util._StringUtil;
 import org.apache.freemarker.core.util.XmlEscape;
+import org.apache.freemarker.core.util._ClassUtil;
+import org.apache.freemarker.core.util._NullArgumentException;
+import org.apache.freemarker.core.util._SecurityUtil;
 import org.apache.freemarker.core.util._SortedArraySet;
+import org.apache.freemarker.core.util._StringUtil;
+import org.apache.freemarker.core.util._UnmodifiableCompositeSet;
 
 /**
  * <b>The main entry point into the FreeMarker API</b>; encapsulates the configuration settings of FreeMarker,
@@ -396,38 +382,11 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
     /** Enable auto-escaping if the {@link OutputFormat} supports it. */
     public static final int ENABLE_IF_SUPPORTED_AUTO_ESCAPING_POLICY = 22;
     
-    /** FreeMarker version 2.3.0 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_0 = new Version(2, 3, 0);
-    
-    /** FreeMarker version 2.3.19 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_19 = new Version(2, 3, 19);
-    
-    /** FreeMarker version 2.3.20 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_20 = new Version(2, 3, 20);
-    
-    /** FreeMarker version 2.3.21 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_21 = new Version(2, 3, 21);
-
-    /** FreeMarker version 2.3.22 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_22 = new Version(2, 3, 22);
-
-    /** FreeMarker version 2.3.23 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_23 = new Version(2, 3, 23);
-
-    /** FreeMarker version 2.3.24 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_24 = new Version(2, 3, 24);
-
-    /** FreeMarker version 2.3.25 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_25 = new Version(2, 3, 25);
-
-    /** FreeMarker version 2.3.26 (an {@link #Configuration(Version) incompatible improvements break-point}) */
-    public static final Version VERSION_2_3_26 = new Version(2, 3, 26);
-    
     /** FreeMarker version 3.0.0 (an {@link #Configuration(Version) incompatible improvements break-point}) */
     public static final Version VERSION_3_0_0 = new Version(3, 0, 0);
     
-    /** The default of {@link #getIncompatibleImprovements()}, currently {@link #VERSION_2_3_0}. */
-    public static final Version DEFAULT_INCOMPATIBLE_IMPROVEMENTS = Configuration.VERSION_2_3_0;
+    /** The default of {@link #getIncompatibleImprovements()}, currently {@link #VERSION_3_0_0}. */
+    public static final Version DEFAULT_INCOMPATIBLE_IMPROVEMENTS = Configuration.VERSION_3_0_0;
     /** @deprecated Use {@link #DEFAULT_INCOMPATIBLE_IMPROVEMENTS} instead. */
     @Deprecated
     public static final String DEFAULT_INCOMPATIBLE_ENHANCEMENTS = DEFAULT_INCOMPATIBLE_IMPROVEMENTS.toString();
@@ -477,24 +436,6 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
         }
     }
     
-    private static final String FM_24_DETECTION_CLASS_NAME = "org.apache.freemarker.core.ast._2_4_OrLaterMarker";
-    private static final boolean FM_24_DETECTED;
-    static {
-        boolean fm24detected;
-        try {
-            Class.forName(FM_24_DETECTION_CLASS_NAME);
-            fm24detected = true;
-        } catch (ClassNotFoundException e) {
-            fm24detected = false;
-        } catch (LinkageError e) {
-            fm24detected = true;
-        } catch (Throwable e) {
-            // Unexpected. We assume that there's no clash.
-            fm24detected = false;
-        }
-        FM_24_DETECTED = fm24detected;
-    }
-    
     private final static Object defaultConfigLock = new Object();
 
     private static volatile Configuration defaultConfig;
@@ -574,274 +515,19 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
      * <p>Currently the effects of this setting are:
      * <ul>
      *   <li><p>
-     *     2.3.0: This is the lowest supported value, the version used in older projects. This is the default in the
-     *     FreeMarker 2.3.x series.
-     *   </li>
-     *   <li><p>
-     *     2.3.19 (or higher): Bug fix: Wrong {@code #} tags were printed as static text instead of
-     *     causing parsing error when there was no correct {@code #} or {@code @} tag earlier in the
-     *     same template.
-     *   </li>
-     *   <li><p>
-     *     2.3.20 (or higher): {@code ?html} will escape apostrophe-quotes just like {@code ?xhtml} does. Utilizing
-     *     this is highly recommended, because otherwise if interpolations are used inside attribute values that use
-     *     apostrophe-quotation (<tt>&lt;foo bar='${val}'&gt;</tt>) instead of plain quotation mark
-     *     (<tt>&lt;foo bar="${val}"&gt;</tt>), they might produce HTML/XML that's not well-formed. Note that
-     *     {@code ?html} didn't do this because long ago there was no cross-browser way of doing this, but it's not a
-     *     concern anymore.
-     *   </li>
-     *   <li><p>
-     *     2.3.21 (or higher):
-     *     <ul>
-     *       <li><p>
-     *         The <em>default</em> of the {@code object_wrapper} setting ({@link #getObjectWrapper()}) changes from
-     *         {@code ObjectWrapper.DEFAULT_WRAPPER} to another almost identical {@link DefaultObjectWrapper} singleton,
-     *         returned by {@link DefaultObjectWrapperBuilder#build()}. The new default object wrapper's
-     *         "incompatible improvements" version is set to the same as of the {@link Configuration}.
-     *         See {@link BeansWrapper#BeansWrapper(Version)} for further details. Furthermore, the new default
-     *         object wrapper doesn't allow changing its settings; setter methods throw {@link IllegalStateException}).
-     *         (If anything tries to call setters on the old default in your application, that's a dangerous bug that
-     *         won't remain hidden now. As the old default is a singleton too, potentially shared by independently
-     *         developed components, most of them expects the out-of-the-box behavior from it (and the others are
-     *         necessarily buggy). Also, then concurrency glitches can occur (and even pollute the class introspection
-     *         templateResolver) because the singleton is modified after publishing to other threads.)
-     *         Furthermore the new default object wrapper shares class introspection templateResolver with other
-     *         {@link BeansWrapper}-s created with {@link BeansWrapperBuilder}, which has an impact as
-     *         {@link BeansWrapper#clearClassIntrospecitonCache()} will be disallowed; see more about it there.
-     *       </li>
-     *       <li><p>
-     *          The {@code ?iso_...} built-ins won't show the time zone offset for {@link java.sql.Time} values anymore,
-     *          because most databases store time values that aren't in any time zone, but just store hour, minute,
-     *          second, and decimal second field values. If you still want to show the offset (like for PostgreSQL
-     *          "time with time zone" columns you should), you can force showing the time zone offset by using
-     *          {@code myTime?string.iso_fz} (and its other variants).
-     *       </li>
-     *       <li><p>{@code ?is_enumerable} correctly returns {@code false} for Java methods get from Java objects that
-     *         are wrapped with {@link BeansWrapper} and its subclasses, like {@link DefaultObjectWrapper}. Although
-     *         method values implement {@link TemplateSequenceModel} (because of a historical design quirk in
-     *         {@link BeansWrapper}), trying to {@code #list} them will cause error, hence they aren't enumerable.
-     *       </li>
-     *       <li><p>
-     *          {@code ?c} will return {@code "INF"}, {@code "-INF"} and {@code "NaN"} for positive/negative infinity
-     *          and IEEE floating point Not-a-Number, respectively. These are the XML Schema compatible representations
-     *          of these special values. Earlier it has returned what {@link DecimalFormat} did with US locale, none of
-     *          which was understood by any (common) computer language.
-     *       </li>
-     *       <li><p>
-     *          FTL hash literals that repeat keys now only have the key once with {@code ?keys}, and only has the last
-     *          value associated to that key with {@code ?values}. This is consistent with the behavior of
-     *          {@code hash[key]} and how maps work in Java.       
-     *       </li>
-     *       <li><p>In most cases (where FreeMarker is able to do that), for {@link TemplateLoader}-s that use
-     *         {@link URLConnection}, {@code URLConnection#setUseCaches(boolean)} will called with {@code false},
-     *         so that only FreeMarker will do caching, not the URL scheme's handler.
-     *         See {@link URLTemplateLoader#setURLConnectionUsesCaches(Boolean)} for more details.
-     *       </li>
-     *       <li><p>
-     *         The default of the {@code template_loader} setting ({@link Configuration#getTemplateLoader()}) changes
-     *         to {@code null}, which means that FreeMarker will not find any templates. Earlier
-     *         the default was a {@link FileTemplateLoader} that used the current directory as the root. This was
-     *         dangerous and fragile as you usually don't have good control over what the current directory will be.
-     *         Luckily, the old default almost never looked for the templates at the right place
-     *         anyway, so pretty much all applications had to set the {@code template_loader} setting, so it's unlikely
-     *         that changing the default breaks your application.
-     *       </li>
-     *       <li><p>
-     *          Right-unlimited ranges become readable (like listable), so {@code <#list 1.. as i>...</#list>} works.
-     *          Earlier they were only usable for slicing (like {@code hits[10..]}).
-     *       </li>
-     *       <li><p>
-     *          Empty ranges return {@link Constants#EMPTY_SEQUENCE} instead of an empty {@link SimpleSequence}. This
-     *          is in theory backward compatible, as the API only promises to give something that implements
-     *          {@link TemplateSequenceModel}.
-     *       </li>
-     *       <li><p>
-     *          Unclosed comments ({@code <#-- ...}) and {@code #noparse}-s won't be silently closed at the end of
-     *          template anymore, but cause a parsing error instead.
-     *       </li>
-     *     </ul>
-     *   </li>
-     *   <li><p>
-     *     2.3.22 (or higher):
-     *     <ul>
-     *       <li><p>
-     *          {@link DefaultObjectWrapper} has some substantial changes with {@code incompatibleImprovements} 2.3.22;
-     *          check them out at {@link DefaultObjectWrapper#DefaultObjectWrapper(Version)}. It's important to know
-     *          that if you set the {@code object_wrapper} setting (to an other value than {@code "default"}), rather
-     *          than leaving it on its default value, the {@code object_wrapper} won't inherit the
-     *          {@code incompatibleImprovements} of the {@link Configuration}. In that case, if you want the 2.3.22
-     *          improvements of {@link DefaultObjectWrapper}, you have to set it in the {@link DefaultObjectWrapper}
-     *          object itself too! (Note that it's OK to use a {@link DefaultObjectWrapper} with a different
-     *          {@code incompatibleImprovements} version number than that of the {@link Configuration}, if that's
-     *          really what you want.)
-     *       </li>
-     *       <li><p>
-     *          In templates, {@code .template_name} will <em>always</em> return the main (top level) template's name.
-     *          It won't be affected by {@code #include} and {@code #nested} anymore. This is unintended, a bug with
-     *          {@code incompatible_improvement} 2.3.22 (a consequence of the lower level fixing described in the next
-     *          point). The old behavior of {@code .template_name} is restored if you set
-     *          {@code incompatible_improvement} to 2.3.23 (while {@link Configurable#getParent()}) of
-     *          {@link Environment} keeps the changed behavior shown in the next point). 
-     *       </li>
-     *       <li><p>
-     *          {@code #include} and {@code #nested} doesn't change the parent {@link Template} (see
-     *          {@link Configurable#getParent()}) of the {@link Environment} anymore to the {@link Template} that's
-     *          included or whose namespace {@code #nested} "returns" to. Thus, the parent of {@link Environment} will
-     *          be now always the main {@link Template}. (The main {@link Template} is the {@link Template} whose
-     *          {@code process} or {@code createProcessingEnvironment} method was called to initiate the output
-     *          generation.) Note that apart from the effect on FTL's {@code .template_name} (see
-     *          previous point), this should only matter if you have set settings directly on {@link Template} objects,
-     *          and almost nobody does that. Also note that macro calls have never changed the {@link Environment}
-     *          parent to the {@link Template} that contains the macro definition, so this mechanism was always broken.
-     *          As now we consistently never change the parent, the behavior when calling macros didn't change.
-     *       </li>
-     *       <li><p>
-     *          When using {@code org.apache.freemarker.servlet.FreemarkerServlet}:
-     *          <ul>
-     *             <li>
-     *               <p>When using custom JSP tag libraries: Fixes bug where some kind of
-     *               values, when put into the JSP <em>page</em> scope (via {@code #global} or via the JSP
-     *               {@code PageContext} API) and later read back with the JSP {@code PageContext} API (typically in a
-     *               custom JSP tag), might come back as FreeMarker {@link TemplateModel} objects instead of as objects
-     *               with a standard Java type. Other Servlet scopes aren't affected. It's highly unlikely that
-     *               something expects the presence of this bug. The affected values are of the FTL types listed below,
-     *               and to trigger the bug, they either had to be created directly in the template (like as an FTL
-     *               literal or with {@code ?date}/{@code time}/{@code datetime}), or you had to use
-     *               {@link DefaultObjectWrapper} or {@link SimpleObjectWrapper} (or a subclass of them):
-     *               
-     *               <ul>
-     *                 <li>FTL date/time/date-time values may came back as {@link SimpleDate}-s, now they come back as
-     *                 {@link java.util.Date java.util.Date}-s instead.</li>
-     *             
-     *                 <li>FTL sequence values may came back as {@link SimpleSequence}-s, now they come back as
-     *                 {@link java.util.List}-s as expected. This at least stands assuming that the
-     *                 {@link Configuration#setSetting(String, String) object_wrapper} configuration setting is a
-     *                 subclass of {@link BeansWrapper} (such as {@link DefaultObjectWrapper}, which is the default),
-     *                 but that's practically always the case in applications that use FreeMarker's JSP extension
-     *                 (otherwise it can still work, but it depends on the quality and capabilities of the
-     *                 {@link ObjectWrapper} implementation).</li>
-     *             
-     *                 <li>FTL hash values may came back as {@link SimpleHash}-es, now they come back as
-     *                 {@link java.util.Map}-s as expected (again, assuming that the object wrapper is a subclass of
-     *                 {@link BeansWrapper}, like preferably {@link DefaultObjectWrapper}, which is also the default).
-     *                 </li>
-     *             
-     *                 <li>FTL collection values may came back as {@link SimpleCollection}-s, now they come back as
-     *                 {@link java.util.Collection}-s as expected (again, assuming that the object wrapper is a subclass
-     *                 of {@link BeansWrapper}, like preferably {@link DefaultObjectWrapper}).</li>
-     *               </ul>
-     *             </li>
-     *             <li><p>
-     *               Initial {@code "["} in the {@code TemplatePath} init-param
-     *               has special meaning; it's used for specifying multiple comma separated locations, like in
-     *               {@code <param-value>[ WEB-INF/templates, classpath:com/example/myapp/templates ]</param-value>}
-     *             </li>
-     *             <li><p>
-     *               Initial <tt>"{"</tt> in the {@code TemplatePath} init-param is reserved for future purposes, and
-     *               thus will throw exception.
-     *             </li>
-     *          </ul>
-     *       </li>
-     *     </ul>
-     *   </li>
-     *   <li><p>
-     *     2.3.23 (or higher):
-     *     <ul>
-     *       <li><p>
-     *          Fixed a loophole in the implementation of the long existing parse-time rule that says that
-     *          {@code #break}, in the FTL source code itself, must occur nested inside a breakable directive, such as
-     *          {@code #list} or {@code #switch}. This check could be circumvented with {@code #macro} or
-     *          {@code #function}, like this:
-     *          {@code <#list 1..1 as x><#macro callMeLater><#break></#macro></#list><@callMeLater />}.
-     *          After activating this fix, this will be a parse time error.
-     *       </li>
-     *       <li><p>
-     *          If you have used {@code incompatible_improvements} 2.3.22 earlier, know that there the behavior of the
-     *          {@code .template_name} special variable used in templates was accidentally altered, but now it's
-     *          restored to be backward compatible with 2.3.0. (Ironically, the restored legacy behavior itself is
-     *          broken when it comes to macro invocations, we just keep it for backward compatibility. If you need fixed
-     *          behavior, use {@code .current_template_name} or {@code .main_template_name} instead.)
-     *       </li>
-     *     </ul>
-     *   </li>
-     *   <li><p>
-     *     2.3.24 (or higher):
-     *     <ul>
-     *       <li><p>
-     *          The default of the
-     *          {@link #setRecognizeStandardFileExtensions(boolean) recognize_standard_file_extensions}
-     *          setting changes to {@code true}, which means that templates whose name ends with {@code ".ftlh"} or
-     *          {@code ".ftlx"} will automatically get {@link HTMLOutputFormat#INSTANCE} or
-     *          {@link XMLOutputFormat#INSTANCE} output format respectively, in both cases with
-     *          {@link #ENABLE_IF_DEFAULT_AUTO_ESCAPING_POLICY} {@link #setAutoEscapingPolicy(int) auto_escaping_policy}.
-     *          These "file" extensions aren't case sensitive.
-     *       </li>
-     *       <li><p>
-     *          In number format and date format strings (like in the {@code number_format} setting, or in templates in
-     *          {@code n?string("0.##")}), an initial {@code '@'} has special meaning; they refer to a custom format
-     *          with the name given after the {@code @} (see: {@link #setCustomNumberFormats(Map)},
-     *          {@link #setCustomDateFormats(Map)}, {@link #setNumberFormat(String)}, and {@link #setDateTimeFormat}).
-     *          If the custom format doesn't exist, that will be an error. To have a literal {@code @} as the first
-     *          character in the output, it has to be written as {@code @@}. Again, all this only applies to the very
-     *          first character of the format string, so {@code @} characters elsewhere must not be doubled. Also, if
-     *          there are any custom formats defined, initial {@code '@'} will have the new meaning regardless of
-     *          the value of the {@code incompatible_improvements} setting. So you don't need to set the
-     *          {@code incompatible_improvements} only to use custom formats. 
-     *       </li>
-     *       <li><p>
-     *          Expressions inside interpolations that were inside <em>string literal expressions</em>
-     *          (not <code>${...}</code>-s in general), like in <code>&lt;#assign s="Hello ${name}!"&gt;</code>, has
-     *          always used {@code incompatbileImprovement}-s 0 (2.3.0 in effect). Now it's fixed.
-     *       </li>
-     *       <li><p>
-     *          {@link DefaultObjectWrapper} has some minor changes with {@code incompatibleImprovements} 2.3.24;
-     *          check them out at {@link DefaultObjectWrapper#DefaultObjectWrapper(Version)}. It's important to know
-     *          that if you set the {@code object_wrapper} setting (to an other value than {@code "default"}), rather
-     *          than leaving it on its default value, the {@code object_wrapper} won't inherit the
-     *          {@code incompatibleImprovements} of the {@link Configuration}. In that case, if you want the 2.3.24
-     *          improvements of {@link DefaultObjectWrapper}, you have to set it in the {@link DefaultObjectWrapper}
-     *          object itself too! (Note that it's OK to use a {@link DefaultObjectWrapper} with a different
-     *          {@code incompatibleImprovements} version number than that of the {@link Configuration}, if that's
-     *          really what you want.)
-     *       </li>
-     *       <li><p>
-     *          Fixed bug: The {@code #import} directive meant to copy the library variable into a global variable if
-     *          it's executed in the main namespace, but that haven't happened when the imported template was already
-     *          imported earlier in another namespace. 
-     *       </li>
-     *       <li><p>
-     *          {@code ?is_sequence} doesn't return {@code true} for Java methods wrapped by {@link BeansWrapper} and
-     *          its subclasses (most notably {@link DefaultObjectWrapper}) anymore, as they only implement the
-     *          {@code [index]} operator, but not {@code ?size}, which causes {@code <#list ...>} to fail among others.
-     *          (They shouldn't implement either, but this is historical heritage.)
-     *     </ul>
-     *   </li>
-     *   <li><p>
-     *     2.3.25 (or higher):
-     *     <ul>
-     *       <li><p>
-     *          When calling {@link Configurable#setAutoIncludes(List)} on a {@link Configuration}, it filters out
-     *          duplicates from the list, similarly as repeatedly calling {@link Configurable#addAutoInclude(String)}
-     *          would, hence avoiding repeated inclusions. Calling {@link Configurable#setAutoIncludes(List)} on other
-     *          {@link Configurable}-s always do this filtering regardless of the incompatible improvements setting. 
-     *     </ul>
+     *     3.0.0: This is the lowest supported value in FreeMarker 3.
      *   </li>
      * </ul>
      * 
      * @throws IllegalArgumentException
      *             If {@code incompatibleImmprovements} refers to a version that wasn't released yet when the currently
-     *             used FreeMarker version was released, or is less than 2.3.0, or is {@code null}.
+     *             used FreeMarker version was released, or is less than 3.0.0, or is {@code null}.
      * 
      * @since 2.3.21
      */
     public Configuration(Version incompatibleImprovements) {
         super(incompatibleImprovements);
         
-        // We postpone this until here (rather that doing this in static initializer) for two reason:
-        // - Class initialization errors are often not reported very well
-        // - This way we avoid the error if FM isn't actually used
-        checkFreeMarkerVersionClash();
-        
         _NullArgumentException.check("incompatibleImprovements", incompatibleImprovements);
         this.incompatibleImprovements = incompatibleImprovements;
         
@@ -849,14 +535,6 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
         loadBuiltInSharedVariables();
     }
 
-    private static void checkFreeMarkerVersionClash() {
-        if (FM_24_DETECTED) {
-            throw new RuntimeException("Clashing FreeMarker versions (" + VERSION + " and some post-2.3.x) detected: "
-                    + "found post-2.3.x class " + FM_24_DETECTION_CLASS_NAME + ". You probably have two different "
-                    + "freemarker.jar-s in the classpath.");
-        }
-    }
-    
     private void createTemplateResolver() {
         templateResolver = new DefaultTemplateResolver(
                 null,
@@ -926,10 +604,6 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
         return getDefaultTemplateExceptionHandler(getIncompatibleImprovements());
     }
     
-    private boolean getDefaultLogTemplateExceptions() {
-        return getDefaultLogTemplateExceptions(getIncompatibleImprovements());
-    }
-    
     private ObjectWrapper getDefaultObjectWrapper() {
         return getDefaultObjectWrapper(getIncompatibleImprovements());
     }
@@ -938,11 +612,6 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
     final static TemplateExceptionHandler getDefaultTemplateExceptionHandler(Version incompatibleImprovements) {
         return TemplateExceptionHandler.DEBUG_HANDLER;
     }
-
-    // Package visible as Configurable needs this to initialize the field defaults.
-    final static boolean getDefaultLogTemplateExceptions(Version incompatibleImprovements) {
-        return true;
-    }
     
     @Override
     public Object clone() {
@@ -1608,7 +1277,7 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
      */
     public void unsetLogTemplateExceptions() {
         if (logTemplateExceptionsExplicitlySet) {
-            setLogTemplateExceptions(getDefaultLogTemplateExceptions());
+            setLogTemplateExceptions(false);
             logTemplateExceptionsExplicitlySet = false;
         }
     }
@@ -2098,7 +1767,7 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
     @Override
     public boolean getRecognizeStandardFileExtensions() {
         return recognizeStandardFileExtensions == null
-                ? incompatibleImprovements.intValue() >= _TemplateAPI.VERSION_INT_2_3_24
+                ? true
                 : recognizeStandardFileExtensions.booleanValue();
     }
 
@@ -3128,11 +2797,7 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
      * @since 2.3.21
      */
     public static ObjectWrapper getDefaultObjectWrapper(Version incompatibleImprovements) {
-        if (incompatibleImprovements.intValue() < _TemplateAPI.VERSION_INT_2_3_21) {
-            return _StaticObjectWrappers.DEFAULT_OBJECT_WRAPPER;
-        } else {
-            return new DefaultObjectWrapperBuilder(incompatibleImprovements).build();
-        }
+        return new DefaultObjectWrapperBuilder(incompatibleImprovements).build();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/Template.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/Template.java b/src/main/java/org/apache/freemarker/core/Template.java
index 9c97c5c..1f7c83a 100644
--- a/src/main/java/org/apache/freemarker/core/Template.java
+++ b/src/main/java/org/apache/freemarker/core/Template.java
@@ -369,14 +369,7 @@ public class Template extends Configurable {
 
     private static Version normalizeTemplateLanguageVersion(Version incompatibleImprovements) {
         _TemplateAPI.checkVersionNotNullAndSupported(incompatibleImprovements);
-        int v = incompatibleImprovements.intValue();
-        if (v < _TemplateAPI.VERSION_INT_2_3_19) {
-            return Configuration.VERSION_2_3_0;
-        } else if (v > _TemplateAPI.VERSION_INT_2_3_21) {
-            return Configuration.VERSION_2_3_21;
-        } else { // if 2.3.19 or 2.3.20 or 2.3.21
-            return incompatibleImprovements;
-        }
+        return Configuration.VERSION_3_0_0;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/_TemplateAPI.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/_TemplateAPI.java b/src/main/java/org/apache/freemarker/core/_TemplateAPI.java
index bf3ffb0..8eefbd6 100644
--- a/src/main/java/org/apache/freemarker/core/_TemplateAPI.java
+++ b/src/main/java/org/apache/freemarker/core/_TemplateAPI.java
@@ -25,8 +25,6 @@ import org.apache.freemarker.core.ast.Expression;
 import org.apache.freemarker.core.ast.OutputFormat;
 import org.apache.freemarker.core.ast.TemplateObject;
 import org.apache.freemarker.core.templateresolver.CacheStorage;
-import org.apache.freemarker.core.templateresolver.TemplateLookupStrategy;
-import org.apache.freemarker.core.templateresolver.TemplateNameFormat;
 import org.apache.freemarker.core.util._NullArgumentException;
 
 /**
@@ -36,16 +34,7 @@ import org.apache.freemarker.core.util._NullArgumentException;
  */ 
 public class _TemplateAPI {
     
-    public static final int VERSION_INT_2_3_0 = Configuration.VERSION_2_3_0.intValue();
-    public static final int VERSION_INT_2_3_19 = Configuration.VERSION_2_3_19.intValue();
-    public static final int VERSION_INT_2_3_20 = Configuration.VERSION_2_3_20.intValue();
-    public static final int VERSION_INT_2_3_21 = Configuration.VERSION_2_3_21.intValue();
-    public static final int VERSION_INT_2_3_22 = Configuration.VERSION_2_3_22.intValue();
-    public static final int VERSION_INT_2_3_23 = Configuration.VERSION_2_3_23.intValue();
-    public static final int VERSION_INT_2_3_24 = Configuration.VERSION_2_3_24.intValue();
-    public static final int VERSION_INT_2_3_25 = Configuration.VERSION_2_3_25.intValue();
-    public static final int VERSION_INT_2_3_26 = Configuration.VERSION_2_3_26.intValue();
-    public static final int VERSION_INT_2_4_0 = Version.intValueFor(2, 4, 0);
+    public static final int VERSION_INT_3_0_0 = Configuration.VERSION_3_0_0.intValue();
     
     public static void checkVersionNotNullAndSupported(Version incompatibleImprovements) {
         _NullArgumentException.check("incompatibleImprovements", incompatibleImprovements);
@@ -55,8 +44,9 @@ public class _TemplateAPI {
                     + incompatibleImprovements + ", but the installed FreeMarker version is only "
                     + Configuration.getVersion() + ". You may need to upgrade FreeMarker in your project.");
         }
-        if (iciV < VERSION_INT_2_3_0) {
-            throw new IllegalArgumentException("\"incompatibleImprovements\" must be at least 2.3.0.");
+        if (iciV < VERSION_INT_3_0_0) {
+            throw new IllegalArgumentException("\"incompatibleImprovements\" must be at least 3.0.0, but was "
+                    + incompatibleImprovements);
         }
     }
     
@@ -73,22 +63,10 @@ public class _TemplateAPI {
         return Configuration.getDefaultTemplateExceptionHandler(incompatibleImprovements);
     }
 
-    public static boolean getDefaultLogTemplateExceptions(Version incompatibleImprovements) {
-        return Configuration.getDefaultLogTemplateExceptions(incompatibleImprovements);
-    }
-
     public static CacheStorage createDefaultCacheStorage(Version incompatibleImprovements) {
         return Configuration.createDefaultCacheStorage(incompatibleImprovements);
     }
     
-    public static TemplateLookupStrategy getDefaultTemplateLookupStrategy(Version incompatibleImprovements) {
-        return Configuration.getDefaultTemplateLookupStrategy(incompatibleImprovements);
-    }
-    
-    public static TemplateNameFormat getDefaultTemplateNameFormat(Version incompatibleImprovements) {
-        return Configuration.getDefaultTemplateNameFormat(incompatibleImprovements);
-    }
-    
     /**
      * [2.4] getSettingNames() becomes to public; remove this.
      */

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/APINotSupportedTemplateException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/APINotSupportedTemplateException.java b/src/main/java/org/apache/freemarker/core/ast/APINotSupportedTemplateException.java
index a34ee92..e232839 100644
--- a/src/main/java/org/apache/freemarker/core/ast/APINotSupportedTemplateException.java
+++ b/src/main/java/org/apache/freemarker/core/ast/APINotSupportedTemplateException.java
@@ -20,7 +20,6 @@
 package org.apache.freemarker.core.ast;
 
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.ObjectWrapper;
 import org.apache.freemarker.core.model.TemplateModel;
 import org.apache.freemarker.core.model.impl.DefaultObjectWrapper;
@@ -56,10 +55,6 @@ class APINotSupportedTemplateException extends TemplateException {
                     desc.tip("In the FreeMarker configuration, \"", Configurable.OBJECT_WRAPPER_KEY,
                             "\" is a DefaultObjectWrapper with its \"useAdaptersForContainers\" property set to "
                             + "false. Setting it to true might solves this problem.");
-                    if (dow.getIncompatibleImprovements().intValue() < _TemplateAPI.VERSION_INT_2_3_22) {
-                        desc.tip("Setting DefaultObjectWrapper's \"incompatibleImprovements\" to 2.3.22 or higher will "
-                                + "change the default value of \"useAdaptersForContainers\" to true.");
-                    }
                 } else if (tm instanceof SimpleSequence && dow.getForceLegacyNonListCollections()) {
                     desc.tip("In the FreeMarker configuration, \"",
                             Configurable.OBJECT_WRAPPER_KEY,

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java b/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
index c48ebca..5d25b3f 100644
--- a/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
+++ b/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
@@ -22,7 +22,6 @@ package org.apache.freemarker.core.ast;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -361,11 +360,6 @@ abstract class BuiltIn extends Expression implements Cloneable {
             throw new ParseException(buf.toString(), null, keyTk);
         }
         
-        while (bi instanceof ICIChainMember
-                && incompatibleImprovements < ((ICIChainMember) bi).getMinimumICIVersion()) {
-            bi = (BuiltIn) ((ICIChainMember) bi).getPreviousICIChainMember();
-        }
-        
         try {
             bi = (BuiltIn) bi.clone();
         } catch (CloneNotSupportedException e) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/BuiltInsForDates.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/BuiltInsForDates.java b/src/main/java/org/apache/freemarker/core/ast/BuiltInsForDates.java
index 5dfd86f..ee84a99 100644
--- a/src/main/java/org/apache/freemarker/core/ast/BuiltInsForDates.java
+++ b/src/main/java/org/apache/freemarker/core/ast/BuiltInsForDates.java
@@ -24,7 +24,6 @@ import java.util.List;
 import java.util.TimeZone;
 
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.AdapterTemplateModel;
 import org.apache.freemarker.core.model.TemplateDateModel;
 import org.apache.freemarker.core.model.TemplateMethodModelEx;
@@ -33,8 +32,8 @@ import org.apache.freemarker.core.model.TemplateModelException;
 import org.apache.freemarker.core.model.TemplateScalarModel;
 import org.apache.freemarker.core.model.impl.SimpleDate;
 import org.apache.freemarker.core.model.impl.SimpleScalar;
-import org.apache.freemarker.core.util._DateUtil;
 import org.apache.freemarker.core.util.UnrecognizedTimeZoneException;
+import org.apache.freemarker.core.util._DateUtil;
 
 /**
  * A holder for built-ins that operate exclusively on date left-hand values.
@@ -205,8 +204,7 @@ class BuiltInsForDates {
                 return showOffset.booleanValue();
             } else {
                 // java.sql.Time values meant to carry calendar field values only, so we don't show offset for them.
-                return !(date instanceof java.sql.Time
-                        && _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21);
+                return !(date instanceof java.sql.Time);
             }
         }
         

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/BuiltInsForMultipleTypes.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/BuiltInsForMultipleTypes.java b/src/main/java/org/apache/freemarker/core/ast/BuiltInsForMultipleTypes.java
index 422ae38..e31a97b 100644
--- a/src/main/java/org/apache/freemarker/core/ast/BuiltInsForMultipleTypes.java
+++ b/src/main/java/org/apache/freemarker/core/ast/BuiltInsForMultipleTypes.java
@@ -23,7 +23,6 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.TemplateBooleanModel;
 import org.apache.freemarker.core.model.TemplateCollectionModel;
 import org.apache.freemarker.core.model.TemplateCollectionModelEx;
@@ -51,25 +50,8 @@ import org.apache.freemarker.core.model.impl.beans.SimpleMethodModel;
  */
 class BuiltInsForMultipleTypes {
 
-    static class cBI extends AbstractCBI implements ICIChainMember {
+    static class cBI extends AbstractCBI {
         
-        static class BIBeforeICE2d3d21 extends AbstractCBI {
-
-            @Override
-            protected TemplateModel formatNumber(Environment env, TemplateModel model) throws TemplateModelException {
-                Number num = EvalUtil.modelToNumber((TemplateNumberModel) model, target);
-                if (num instanceof Integer || num instanceof Long) {
-                    // Accelerate these fairly common cases
-                    return new SimpleScalar(num.toString());
-                } else {
-                    return new SimpleScalar(env.getCNumberFormat().format(num));
-                }
-            }
-            
-        }
-        
-        private final BIBeforeICE2d3d21 prevICIObj = new BIBeforeICE2d3d21();
-
         @Override
         TemplateModel _eval(Environment env) throws TemplateException {
             TemplateModel model = target.eval(env);
@@ -120,16 +102,6 @@ class BuiltInsForMultipleTypes {
         
             return new SimpleScalar(env.getCNumberFormat().format(num));
         }
-
-        @Override
-        public int getMinimumICIVersion() {
-            return _TemplateAPI.VERSION_INT_2_3_21;
-        }
-        
-        @Override
-        public Object getPreviousICIChainMember() {
-            return prevICIObj;
-        }
         
     }
 
@@ -351,9 +323,7 @@ class BuiltInsForMultipleTypes {
             TemplateModel tm = target.eval(env);
             target.assertNonNull(tm, env);
             return (tm instanceof TemplateSequenceModel || tm instanceof TemplateCollectionModel)
-                    && (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21
-                        // These implement TemplateSequenceModel, yet they can't be #list-ed:
-                        || !(tm instanceof SimpleMethodModel || tm instanceof OverloadedMethodsModel))
+                    && !(tm instanceof SimpleMethodModel || tm instanceof OverloadedMethodsModel)
                     ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE;
         }
     }
@@ -441,12 +411,9 @@ class BuiltInsForMultipleTypes {
         TemplateModel _eval(Environment env) throws TemplateException {
             TemplateModel tm = target.eval(env);
             target.assertNonNull(tm, env);
-            return (tm instanceof TemplateSequenceModel
-                        && (
-                            !(tm instanceof OverloadedMethodsModel || tm instanceof SimpleMethodModel)
-                            || !env.isIcI2324OrLater())
-                        )
-                        ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE;
+            return tm instanceof TemplateSequenceModel
+                    && !(tm instanceof OverloadedMethodsModel || tm instanceof SimpleMethodModel) // [FM3] Until BW fixed
+                    ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/BuiltInsForStringsEncoding.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/BuiltInsForStringsEncoding.java b/src/main/java/org/apache/freemarker/core/ast/BuiltInsForStringsEncoding.java
index f273732..d11739f 100644
--- a/src/main/java/org/apache/freemarker/core/ast/BuiltInsForStringsEncoding.java
+++ b/src/main/java/org/apache/freemarker/core/ast/BuiltInsForStringsEncoding.java
@@ -22,7 +22,6 @@ package org.apache.freemarker.core.ast;
 import java.io.UnsupportedEncodingException;
 import java.util.List;
 
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.TemplateMethodModel;
 import org.apache.freemarker.core.model.TemplateModel;
 import org.apache.freemarker.core.model.TemplateModelException;
@@ -32,31 +31,12 @@ import org.apache.freemarker.core.util._StringUtil;
 
 class BuiltInsForStringsEncoding {
 
-    static class htmlBI extends BuiltInForLegacyEscaping implements ICIChainMember {
-        
-        static class BIBeforeICI2d3d20 extends BuiltInForLegacyEscaping {
-            @Override
-            TemplateModel calculateResult(String s, Environment env) {
-                return new SimpleScalar(_StringUtil.XMLEncNA(s));
-            }
-        }
-        
-        private final BIBeforeICI2d3d20 prevICIObj = new BIBeforeICI2d3d20();
+    static class htmlBI extends BuiltInForLegacyEscaping {
         
         @Override
         TemplateModel calculateResult(String s, Environment env) {
             return new SimpleScalar(_StringUtil.XHTMLEnc(s));
         }
-    
-        @Override
-        public int getMinimumICIVersion() {
-            return _TemplateAPI.VERSION_INT_2_3_20;
-        }
-    
-        @Override
-        public Object getPreviousICIChainMember() {
-            return prevICIObj;
-        }
         
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/BuiltinVariable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/BuiltinVariable.java b/src/main/java/org/apache/freemarker/core/ast/BuiltinVariable.java
index 4781b05..dc29e7d 100644
--- a/src/main/java/org/apache/freemarker/core/ast/BuiltinVariable.java
+++ b/src/main/java/org/apache/freemarker/core/ast/BuiltinVariable.java
@@ -24,9 +24,6 @@ import java.util.Date;
 
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
-import org.apache.freemarker.core.ast.FMParserTokenManager;
-import org.apache.freemarker.core.ast.Token;
 import org.apache.freemarker.core.model.TemplateDateModel;
 import org.apache.freemarker.core.model.TemplateHashModel;
 import org.apache.freemarker.core.model.TemplateModel;
@@ -205,11 +202,9 @@ final class BuiltinVariable extends Expression {
         }
         if (name == TEMPLATE_NAME || name == TEMPLATE_NAME_CC) {
             // The behavior of env.getTemplate() was changed with IcI 2.3.22, but there was an unintended side effect
-            // of changing the behavior of .template_name, which was fixed with IcI 2.3.23. IcI 2.3.22 deliberately
+            // of changing the behavior of .template_name, which was oms with IcI 2.3.23. IcI 2.3.22 deliberately
             // remains broken.
-            return (env.getConfiguration().getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_23)
-                    ? new SimpleScalar(env.getTemplate230().getName())
-                    : new SimpleScalar(env.getTemplate().getName());
+            return (new SimpleScalar(env.getTemplate230().getName()));
         }
         if (name == MAIN_TEMPLATE_NAME || name == MAIN_TEMPLATE_NAME_CC) {
             return SimpleScalar.newInstanceOrNull(env.getMainTemplate().getName());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/Configurable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/Configurable.java b/src/main/java/org/apache/freemarker/core/ast/Configurable.java
index 48b04a7..3873f57 100644
--- a/src/main/java/org/apache/freemarker/core/ast/Configurable.java
+++ b/src/main/java/org/apache/freemarker/core/ast/Configurable.java
@@ -87,7 +87,6 @@ public class Configurable {
     
     private static final String NULL = "null";
     private static final String DEFAULT = "default";
-    private static final String DEFAULT_2_3_0 = "default_2_3_0";
     private static final String JVM_DEFAULT = "JVM default";
     
     /** Legacy, snake case ({@code like_this}) variation of the setting name. @since 2.3.23 */
@@ -426,8 +425,7 @@ public class Configurable {
         apiBuiltinEnabled = Boolean.FALSE;
         properties.setProperty(API_BUILTIN_ENABLED_KEY, apiBuiltinEnabled.toString());
         
-        logTemplateExceptions = Boolean.valueOf(
-                _TemplateAPI.getDefaultLogTemplateExceptions(incompatibleImprovements));
+        logTemplateExceptions = Boolean.FALSE;
         properties.setProperty(LOG_TEMPLATE_EXCEPTIONS_KEY, logTemplateExceptions.toString());
         
         // outputEncoding and urlEscapingCharset defaults to null,
@@ -613,7 +611,7 @@ public class Configurable {
      *   {@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
      *   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 probably was meant to shown "as is".
+     *   those are the time zone correct renderings, those values are probably meant to be shown "as is".
      *   
      *   <li>You may wonder why this setting isn't simply "SQL time zone", since the time zone related behavior of JDBC
      *   applies to {@link java.sql.Timestamp java.sql.Timestamp} too. FreeMarker assumes that you have set up your
@@ -1763,23 +1761,12 @@ public class Configurable {
      * @see #setAutoIncludes(List)
      */
     public void addAutoInclude(String templateName) {
-        addAutoInclude(templateName, false);
-    }
-
-    /**
-     * @param keepDuplicate
-     *            Used for emulating legacy glitch, where duplicates weren't removed if the inclusion was added via
-     *            {@link #setAutoIncludes(List)}.
-     */
-    private void addAutoInclude(String templateName, boolean keepDuplicate) {
         // "synchronized" is removed from the API as it's not safe to set anything after publishing the Configuration
         synchronized (this) {
             if (autoIncludes == null) {
                 initAutoIncludesList();
             } else {
-                if (!keepDuplicate) {
-                    autoIncludes.remove(templateName);
-                }
+                autoIncludes.remove(templateName);
             }
             autoIncludes.add(templateName);
         }
@@ -1806,8 +1793,7 @@ public class Configurable {
                 if (!(templateName instanceof String)) {
                     throw new IllegalArgumentException("List items must be String-s.");
                 }
-                addAutoInclude((String) templateName, this instanceof Configuration && ((Configuration) this)
-                        .getIncompatibleImprovements().intValue() < _TemplateAPI.VERSION_INT_2_3_25);
+                addAutoInclude((String) templateName);
             }
         }
     }
@@ -2334,10 +2320,8 @@ public class Configurable {
                     if (this instanceof Configuration) {
                         ((Configuration) this).unsetObjectWrapper();
                     } else {
-                        setObjectWrapper(Configuration.getDefaultObjectWrapper(Configuration.VERSION_2_3_0));
+                        setObjectWrapper(Configuration.getDefaultObjectWrapper(Configuration.VERSION_3_0_0));
                     }
-                } else if (DEFAULT_2_3_0.equalsIgnoreCase(value)) {
-                    setObjectWrapper(Configuration.getDefaultObjectWrapper(Configuration.VERSION_2_3_0));
                 } else if ("simple".equalsIgnoreCase(value)) {
                     setObjectWrapper(_StaticObjectWrappers.SIMPLE_OBJECT_WRAPPER);
                 } else if ("beans".equalsIgnoreCase(value)) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/DynamicKeyName.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/DynamicKeyName.java b/src/main/java/org/apache/freemarker/core/ast/DynamicKeyName.java
index af2dc3e..38f4ee3 100644
--- a/src/main/java/org/apache/freemarker/core/ast/DynamicKeyName.java
+++ b/src/main/java/org/apache/freemarker/core/ast/DynamicKeyName.java
@@ -20,10 +20,9 @@
 package org.apache.freemarker.core.ast;
 
 import java.util.ArrayList;
-import java.util.Collections;
 
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
+import org.apache.freemarker.core.model.Constants;
 import org.apache.freemarker.core.model.TemplateHashModel;
 import org.apache.freemarker.core.model.TemplateModel;
 import org.apache.freemarker.core.model.TemplateNumberModel;
@@ -31,7 +30,6 @@ import org.apache.freemarker.core.model.TemplateScalarModel;
 import org.apache.freemarker.core.model.TemplateSequenceModel;
 import org.apache.freemarker.core.model.impl.SimpleScalar;
 import org.apache.freemarker.core.model.impl.SimpleSequence;
-import org.apache.freemarker.core.model.Constants;
 
 /**
  * {@code target[keyExpression]}, where, in FM 2.3, {@code keyExpression} can be string, a number or a range,
@@ -244,11 +242,7 @@ final class DynamicKeyName extends Expression {
     }
 
     private TemplateModel emptyResult(boolean seq) {
-        return seq
-                ? (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21
-                        ? new SimpleSequence(Collections.EMPTY_LIST, null)
-                        : Constants.EMPTY_SEQUENCE)
-                : TemplateScalarModel.EMPTY_STRING;
+        return seq ? Constants.EMPTY_SEQUENCE : TemplateScalarModel.EMPTY_STRING;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/Environment.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/Environment.java b/src/main/java/org/apache/freemarker/core/ast/Environment.java
index b133475..277a7a5 100644
--- a/src/main/java/org/apache/freemarker/core/ast/Environment.java
+++ b/src/main/java/org/apache/freemarker/core/ast/Environment.java
@@ -45,7 +45,6 @@ import org.apache.freemarker.core.Template;
 import org.apache.freemarker.core.TemplateException;
 import org.apache.freemarker.core.TemplateExceptionHandler;
 import org.apache.freemarker.core._CoreLogs;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.ObjectWrapper;
 import org.apache.freemarker.core.model.TemplateCollectionModel;
 import org.apache.freemarker.core.model.TemplateDateModel;
@@ -166,7 +165,7 @@ public final class Environment extends Configurable {
     private final Namespace mainNamespace;
     private Namespace currentNamespace, globalNamespace;
     private HashMap<String, Namespace> loadedLibs;
-    private Configurable legacyParent;
+    private Configurable legacyParent; // [FM3] Get rid of this
 
     private boolean inAttemptBlock;
     private Throwable lastThrowable;
@@ -560,13 +559,8 @@ public final class Environment extends Configurable {
             currentNamespace = invokingMacroContext.nestedContentNamespace;
 
             final Configurable prevParent;
-            final boolean parentReplacementOn = isBeforeIcI2322();
             prevParent = getParent();
-            if (parentReplacementOn) {
-                setParent(currentNamespace.getTemplate());
-            } else {
-                legacyParent = currentNamespace.getTemplate();
-            }
+            legacyParent = currentNamespace.getTemplate();
 
             localContextStack = invokingMacroContext.prevLocalContextStack;
             if (invokingMacroContext.nestedContentParameterNames != null) {
@@ -580,11 +574,7 @@ public final class Environment extends Configurable {
                 }
                 currentMacroContext = invokingMacroContext;
                 currentNamespace = getMacroNamespace(invokingMacroContext.getMacro());
-                if (parentReplacementOn) {
-                    setParent(prevParent);
-                } else {
-                    legacyParent = prevParent;
-                }
+                legacyParent = prevParent;
                 localContextStack = prevLocalContextStack;
             }
         }
@@ -1265,7 +1255,6 @@ public final class Environment extends Configurable {
         int formatStringLen = formatString.length();
         if (formatStringLen > 1
                 && formatString.charAt(0) == '@'
-                && (isIcI2324OrLater() || hasCustomFormats())
                 && Character.isLetter(formatString.charAt(1))) {
             final String name;
             final String params;
@@ -1771,7 +1760,6 @@ public final class Environment extends Configurable {
             formatParams = formatString; // for speed, we don't remove the prefix
         } else if (firstChar == '@'
                 && formatStringLen > 1
-                && (isIcI2324OrLater() || hasCustomFormats())
                 && Character.isLetter(formatString.charAt(1))) {
             final String name;
             {
@@ -2508,23 +2496,14 @@ public final class Environment extends Configurable {
     public void include(Template includedTemplate)
             throws TemplateException, IOException {
         final Template prevTemplate;
-        final boolean parentReplacementOn = isBeforeIcI2322();
         prevTemplate = getTemplate();
-        if (parentReplacementOn) {
-            setParent(includedTemplate);
-        } else {
-            legacyParent = includedTemplate;
-        }
+        legacyParent = includedTemplate;
 
         importMacros(includedTemplate);
         try {
             visit(includedTemplate.getRootTreeNode());
         } finally {
-            if (parentReplacementOn) {
-                setParent(prevTemplate);
-            } else {
-                legacyParent = prevTemplate;
-            }
+            legacyParent = prevTemplate;
         }
     }
 
@@ -2615,7 +2594,7 @@ public final class Environment extends Configurable {
             lazyImport = false;
             // As we have an already normalized name, we use it. 2.3.x note: We should use the template.sourceName as
             // namespace key, but historically we use the looked up name (template.name); check what lazy import does if
-            // that will be fixed, as that can't do the template lookup, yet the keys must be the same.
+            // that will be oms, as that can't do the template lookup, yet the keys must be the same.
             templateName = loadedTemplate.getName();
         } else {
             lazyImport = true;
@@ -2633,7 +2612,7 @@ public final class Environment extends Configurable {
         if (existingNamespace != null) {
             if (targetNsVarName != null) {
                 setVariable(targetNsVarName, existingNamespace);
-                if (isIcI2324OrLater() && currentNamespace == mainNamespace) {
+                if (currentNamespace == mainNamespace) {
                     globalNamespace.put(targetNsVarName, existingNamespace);
                 }
             }
@@ -3019,14 +2998,6 @@ public final class Environment extends Configurable {
         }
     };
 
-    private boolean isBeforeIcI2322() {
-        return configuration.getIncompatibleImprovements().intValue() < _TemplateAPI.VERSION_INT_2_3_22;
-    }
-
-    boolean isIcI2324OrLater() {
-        return configuration.getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_24;
-    }
-
     /**
      * See {@link #setFastInvalidReferenceExceptions(boolean)}.
      */

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/HashLiteral.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/HashLiteral.java b/src/main/java/org/apache/freemarker/core/ast/HashLiteral.java
index fc36547..1b8bf3a 100644
--- a/src/main/java/org/apache/freemarker/core/ast/HashLiteral.java
+++ b/src/main/java/org/apache/freemarker/core/ast/HashLiteral.java
@@ -25,7 +25,6 @@ import java.util.LinkedHashMap;
 import java.util.ListIterator;
 
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.TemplateCollectionModel;
 import org.apache.freemarker.core.model.TemplateHashModelEx2;
 import org.apache.freemarker.core.model.TemplateModel;
@@ -111,34 +110,14 @@ final class HashLiteral extends Expression {
         private TemplateCollectionModel keyCollection, valueCollection; // ordered lists of keys and values
 
         SequenceHash(Environment env) throws TemplateException {
-            if (_TemplateAPI.getTemplateLanguageVersionAsInt(HashLiteral.this) >= _TemplateAPI.VERSION_INT_2_3_21) {
-                map = new LinkedHashMap();
-                for (int i = 0; i < size; i++) {
-                    Expression keyExp = (Expression) keys.get(i);
-                    Expression valExp = (Expression) values.get(i);
-                    String key = keyExp.evalAndCoerceToPlainText(env);
-                    TemplateModel value = valExp.eval(env);
-                    valExp.assertNonNull(value, env);
-                    map.put(key, value);
-                }
-            } else {
-                // Legacy hash literal, where repeated keys were kept when doing ?values or ?keys, yet overwritten when
-                // doing hash[key].
-                map = new HashMap();
-                ArrayList keyList = new ArrayList(size);
-                ArrayList valueList = new ArrayList(size);
-                for (int i = 0; i < size; i++) {
-                    Expression keyExp = (Expression) keys.get(i);
-                    Expression valExp = (Expression) values.get(i);
-                    String key = keyExp.evalAndCoerceToPlainText(env);
-                    TemplateModel value = valExp.eval(env);
-                    valExp.assertNonNull(value, env);
-                    map.put(key, value);
-                    keyList.add(key);
-                    valueList.add(value);
-                }
-                keyCollection = new CollectionAndSequence(new SimpleSequence(keyList));
-                valueCollection = new CollectionAndSequence(new SimpleSequence(valueList));
+            map = new LinkedHashMap();
+            for (int i = 0; i < size; i++) {
+                Expression keyExp = (Expression) keys.get(i);
+                Expression valExp = (Expression) values.get(i);
+                String key = keyExp.evalAndCoerceToPlainText(env);
+                TemplateModel value = valExp.eval(env);
+                valExp.assertNonNull(value, env);
+                map.put(key, value);
             }
         }
 
@@ -150,7 +129,6 @@ final class HashLiteral extends Expression {
         @Override
         public TemplateCollectionModel keys() {
             if (keyCollection == null) {
-                // This can only happen when IcI >= 2.3.21, an the map is a LinkedHashMap.
                 keyCollection = new CollectionAndSequence(new SimpleSequence(map.keySet()));
             }
             return keyCollection;
@@ -159,7 +137,6 @@ final class HashLiteral extends Expression {
         @Override
         public TemplateCollectionModel values() {
             if (valueCollection == null) {
-                // This can only happen when IcI >= 2.3.21, an the map is a LinkedHashMap.
                 valueCollection = new CollectionAndSequence(new SimpleSequence(map.values()));
             }
             return valueCollection;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/ICIChainMember.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/ICIChainMember.java b/src/main/java/org/apache/freemarker/core/ast/ICIChainMember.java
deleted file mode 100644
index 34a1a10..0000000
--- a/src/main/java/org/apache/freemarker/core/ast/ICIChainMember.java
+++ /dev/null
@@ -1,41 +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.ast;
-
-import org.apache.freemarker.core.Configuration;
-import org.apache.freemarker.core.Version;
-
-/**
- * An object that has another older version that's used below a certain
- * {@link Configuration#setIncompatibleImprovements(Version) InCompatible Improvements} version.  
- */
-interface ICIChainMember {
-
-    /**
-     * The minimum ICE version after which this object can be used.
-     */
-    int getMinimumICIVersion();
-
-    /**
-     * The closest object used for ICE lower than {@link #getMinimumICIVersion()}.
-     */
-    Object getPreviousICIChainMember();
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/Interpret.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/Interpret.java b/src/main/java/org/apache/freemarker/core/ast/Interpret.java
index 140ccea..8c4274c 100644
--- a/src/main/java/org/apache/freemarker/core/ast/Interpret.java
+++ b/src/main/java/org/apache/freemarker/core/ast/Interpret.java
@@ -79,7 +79,7 @@ class Interpret extends OutputFormatBoundBuiltIn {
                     env);
         }
         String templateSource = sourceExpr.evalAndCoerceToPlainText(env);
-        Template parentTemplate = env.getTemplate();
+        Template parentTemplate = env.getCurrentTemplate();
         
         final Template interpretedTemplate;
         try {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/NonListableRightUnboundedRangeModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/NonListableRightUnboundedRangeModel.java b/src/main/java/org/apache/freemarker/core/ast/NonListableRightUnboundedRangeModel.java
deleted file mode 100644
index 14c8d9e..0000000
--- a/src/main/java/org/apache/freemarker/core/ast/NonListableRightUnboundedRangeModel.java
+++ /dev/null
@@ -1,40 +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.ast;
-
-import org.apache.freemarker.core.model.TemplateModelException;
-
-/**
- * This exists for backward compatibly, and is used before Incompatible Improvements 2.3.21 only.
- * 
- * @since 2.3.21
- */
-final class NonListableRightUnboundedRangeModel extends RightUnboundedRangeModel {
-
-    NonListableRightUnboundedRangeModel(int begin) {
-        super(begin);
-    }
-
-    @Override
-    public int size() throws TemplateModelException {
-        return 0;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/Range.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/Range.java b/src/main/java/org/apache/freemarker/core/ast/Range.java
index 949fd53..8cd01cf 100644
--- a/src/main/java/org/apache/freemarker/core/ast/Range.java
+++ b/src/main/java/org/apache/freemarker/core/ast/Range.java
@@ -20,7 +20,6 @@
 package org.apache.freemarker.core.ast;
 
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.TemplateModel;
 
 /**
@@ -56,9 +55,7 @@ final class Range extends Expression {
                     begin, endType != END_SIZE_LIMITED ? lhoValue : begin + lhoValue,
                     endType == END_INCLUSIVE, endType == END_SIZE_LIMITED); 
         } else {
-            return _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21
-                    ? new ListableRightUnboundedRangeModel(begin)
-                    : new NonListableRightUnboundedRangeModel(begin);
+            return new ListableRightUnboundedRangeModel(begin);
         }
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java b/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
index b5695fd..4e6b886 100644
--- a/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
+++ b/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
@@ -113,13 +113,6 @@ public final class TemplateConfiguration extends Configurable implements ParserC
             return;
         }
         
-        if (((Configuration) cfg).getIncompatibleImprovements().intValue() < _TemplateAPI.VERSION_INT_2_3_22
-                && hasAnyConfigurableSet()) {
-            throw new IllegalStateException(
-                    "This TemplateConfiguration can't be associated to a Configuration that has "
-                    + "incompatibleImprovements less than 2.3.22, because it changes non-parser settings.");
-        }
-        
         super.setParent(cfg);
         parentConfigurationSet = true;
     }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/ast/_SettingEvaluationEnvironment.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/_SettingEvaluationEnvironment.java b/src/main/java/org/apache/freemarker/core/ast/_SettingEvaluationEnvironment.java
index 0b4e917..1f61224 100644
--- a/src/main/java/org/apache/freemarker/core/ast/_SettingEvaluationEnvironment.java
+++ b/src/main/java/org/apache/freemarker/core/ast/_SettingEvaluationEnvironment.java
@@ -54,7 +54,7 @@ public class _SettingEvaluationEnvironment {
 
     public BeansWrapper getObjectWrapper() {
         if (objectWrapper == null) {
-            objectWrapper = new BeansWrapper(Configuration.VERSION_2_3_21);
+            objectWrapper = new BeansWrapper(Configuration.VERSION_3_0_0);
         }
         return objectWrapper;
     }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/model/TemplateHashModelEx2.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/TemplateHashModelEx2.java b/src/main/java/org/apache/freemarker/core/model/TemplateHashModelEx2.java
index 9dae9df..bbbd3c0 100644
--- a/src/main/java/org/apache/freemarker/core/model/TemplateHashModelEx2.java
+++ b/src/main/java/org/apache/freemarker/core/model/TemplateHashModelEx2.java
@@ -55,7 +55,7 @@ public interface TemplateHashModelEx2 extends TemplateHashModelEx {
     }
     
     /**
-     * Iterates over the key-value pairs in a hash. This is very similar to an {@link Iterator}, but has a fixed item
+     * Iterates over the key-value pairs in a hash. This is very similar to an {@link Iterator}, but has a oms item
      * type, can throw {@link TemplateModelException}-s, and has no {@code remove()} method. 
      *
      * @since 2.3.25

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
index ba474c9..2da53de 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
@@ -29,7 +29,6 @@ import java.util.Set;
 
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.Version;
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.model.ObjectWrapper;
 import org.apache.freemarker.core.model.TemplateBooleanModel;
 import org.apache.freemarker.core.model.TemplateCollectionModel;
@@ -252,8 +251,7 @@ public class DefaultObjectWrapper extends org.apache.freemarker.core.model.impl.
 
     /**
      * Sets if to wrap container objects ({@link Map}-s, {@link List}-s, arrays and such) the legacy copying approach or
-     * the newer adapter approach should be used. {@code true} is recommended, which is also the default when the
-     * {@code incompatible_improvements} of this instance was set to {@link Configuration#VERSION_2_3_22} or higher. To
+     * the newer adapter approach should be used. {@code true} is recommended, which is also the default. To
      * understand the difference, check some of the classes that implement the two approaches:
      * <ul>
      * <li>Copying approach: {@link SimpleHash}, {@link SimpleSequence}</li>
@@ -340,11 +338,7 @@ public class DefaultObjectWrapper extends org.apache.freemarker.core.model.impl.
      * @since 2.3.22
      */
     protected static Version normalizeIncompatibleImprovementsVersion(Version incompatibleImprovements) {
-        _TemplateAPI.checkVersionNotNullAndSupported(incompatibleImprovements);
-        Version bwIcI = BeansWrapper.normalizeIncompatibleImprovementsVersion(incompatibleImprovements);
-        return incompatibleImprovements.intValue() < _TemplateAPI.VERSION_INT_2_3_22
-                || bwIcI.intValue() >= _TemplateAPI.VERSION_INT_2_3_22
-                ? bwIcI : Configuration.VERSION_2_3_22;
+        return BeansWrapper.normalizeIncompatibleImprovementsVersion(incompatibleImprovements);
     }
 
     /**



Mime
View raw message