freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [7/9] incubator-freemarker git commit: Removed support for incompatibleImprovements below 3.0.0.
Date Mon, 20 Feb 2017 10:14:30 GMT
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/java/org/apache/freemarker/servlet/jsp/FreeMarkerPageContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/servlet/jsp/FreeMarkerPageContext.java b/src/main/java/org/apache/freemarker/servlet/jsp/FreeMarkerPageContext.java
index cb15e50..441c11c 100644
--- a/src/main/java/org/apache/freemarker/servlet/jsp/FreeMarkerPageContext.java
+++ b/src/main/java/org/apache/freemarker/servlet/jsp/FreeMarkerPageContext.java
@@ -45,7 +45,6 @@ import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.PageContext;
 import javax.servlet.jsp.tagext.BodyContent;
 
-import org.apache.freemarker.core._TemplateAPI;
 import org.apache.freemarker.core.ast.Environment;
 import org.apache.freemarker.core.model.AdapterTemplateModel;
 import org.apache.freemarker.core.model.ObjectWrapper;
@@ -195,9 +194,9 @@ abstract class FreeMarkerPageContext extends PageContext implements TemplateMode
             case PAGE_SCOPE: {
                 try {
                     final TemplateModel tm = environment.getGlobalNamespace().get(name);
-                    if (incompatibleImprovements >= _TemplateAPI.VERSION_INT_2_3_22 && unwrapper != null) {
+                    if (unwrapper != null) {
                         return unwrapper.unwrap(tm);
-                    } else { // Legacy behavior branch
+                    } else { // [FM3] Such unwrapping logic rather belongs to some core util
                         if (tm instanceof AdapterTemplateModel) {
                             return ((AdapterTemplateModel) tm).getAdaptedObject(OBJECT_CLASS);
                         }
@@ -213,8 +212,7 @@ abstract class FreeMarkerPageContext extends PageContext implements TemplateMode
                         if (tm instanceof TemplateBooleanModel) {
                             return Boolean.valueOf(((TemplateBooleanModel) tm).getAsBoolean());
                         }
-                        if (incompatibleImprovements >= _TemplateAPI.VERSION_INT_2_3_22
-                                && tm instanceof TemplateDateModel) {
+                        if (tm instanceof TemplateDateModel) {
                             return ((TemplateDateModel) tm).getAsDate();
                         }
                         return tm;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/main/javacc/FTL.jj
----------------------------------------------------------------------
diff --git a/src/main/javacc/FTL.jj b/src/main/javacc/FTL.jj
index 19e60ad..5679fbc 100644
--- a/src/main/javacc/FTL.jj
+++ b/src/main/javacc/FTL.jj
@@ -187,10 +187,6 @@ public class FMParser {
         
         this.outputFormat = outputFormat;
         recalculateAutoEscapingField();                                
-        if (incompatibleImprovements < _TemplateAPI.VERSION_INT_2_3_24) {
-            // Emulate bug, where the string literal parser haven't inherited the IcI:
-            incompatibleImprovements = _TemplateAPI.VERSION_INT_2_3_0;
-        }
     }
 
     void tearDownStringLiteralMode(FMParserTokenManager parentTokenSource) {
@@ -931,70 +927,66 @@ TOKEN:
      */
     <UNKNOWN_DIRECTIVE : ("[#" | "[/#" | "<#" | "</#") (["a"-"z", "A"-"Z", "_"])+>
     {
-        if (!directiveSyntaxEstablished && incompatibleImprovements < _TemplateAPI.VERSION_INT_2_3_19) {
-            matchedToken.kind = STATIC_TEXT_NON_WS;
-        } else {
-            char firstChar = matchedToken.image.charAt(0);
+        char firstChar = matchedToken.image.charAt(0);
 
-            if (!directiveSyntaxEstablished && autodetectTagSyntax) {
-                squBracTagSyntax = (firstChar == '[');
-                directiveSyntaxEstablished = true;
-            }
-
-            if (firstChar == '<' && squBracTagSyntax) {
-                matchedToken.kind = STATIC_TEXT_NON_WS;
-            } else if (firstChar == '[' && !squBracTagSyntax) {
-                matchedToken.kind = STATIC_TEXT_NON_WS;
-            } else {
-                String dn = matchedToken.image;
-                int index = dn.indexOf('#');
-                dn = dn.substring(index + 1);
-
-                // Until the tokenizer/parser is reworked, we have this quirk where something like <#list>
-                // 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 (_CoreAPI.ALL_BUILT_IN_DIRECTIVE_NAMES.contains(dn)) {
-                    throw new TokenMgrError(
-                            "#" + dn + " is an existing directive, but the tag is malformed. " 
-                            + " (See FreeMarker Manual / Directive Reference.)",
-                            TokenMgrError.LEXICAL_ERROR,
-                            matchedToken.beginLine, matchedToken.beginColumn + 1,
-                            matchedToken.endLine, matchedToken.endColumn);
-                }
+        if (!directiveSyntaxEstablished && autodetectTagSyntax) {
+            squBracTagSyntax = (firstChar == '[');
+            directiveSyntaxEstablished = true;
+        }
 
-                String tip = null;
-                if (dn.equals("set") || dn.equals("var")) {
-                    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.";
-                } else if (dn.equals("no_escape")) {
-                	tip = "Use #noescape instead.";
-                } else if (dn.equals("method")) {
-                	tip = "Use #function instead.";
-                } else if (dn.equals("head") || dn.equals("template") || dn.equals("fm")) {
-                	tip = "You may meant #ftl.";
-                } else if (dn.equals("try") || dn.equals("atempt")) {
-                	tip = "You may meant #attempt.";
-                } else if (dn.equals("for") || dn.equals("each") || dn.equals("iterate") || dn.equals("iterator")) {
-                    tip = "You may meant #list (http://freemarker.org/docs/ref_directive_list.html).";
-                } else if (dn.equals("prefix")) {
-                    tip = "You may meant #import. " + PLANNED_DIRECTIVE_HINT;
-                } else if (dn.equals("item") || dn.equals("row") || dn.equals("rows")) {
-                    tip = "You may meant #items.";
-                } else if (dn.equals("separator") || dn.equals("separate") || dn.equals("separ")) {
-                    tip = "You may meant #sep.";
-                } else {
-                    tip = "Help (latest version): http://freemarker.org/docs/ref_directive_alphaidx.html; "
-                            + "you're using FreeMarker " + Configuration.getVersion() + ".";
-                }
+        if (firstChar == '<' && squBracTagSyntax) {
+            matchedToken.kind = STATIC_TEXT_NON_WS;
+        } else if (firstChar == '[' && !squBracTagSyntax) {
+            matchedToken.kind = STATIC_TEXT_NON_WS;
+        } else {
+            String dn = matchedToken.image;
+            int index = dn.indexOf('#');
+            dn = dn.substring(index + 1);
+
+            // Until the tokenizer/parser is reworked, we have this quirk where something like <#list>
+            // 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 (_CoreAPI.ALL_BUILT_IN_DIRECTIVE_NAMES.contains(dn)) {
                 throw new TokenMgrError(
-                        "Unknown directive: #" + dn + (tip != null ? ". " + tip : ""),
+                        "#" + dn + " is an existing directive, but the tag is malformed. " 
+                        + " (See FreeMarker Manual / Directive Reference.)",
                         TokenMgrError.LEXICAL_ERROR,
                         matchedToken.beginLine, matchedToken.beginColumn + 1,
                         matchedToken.endLine, matchedToken.endColumn);
             }
+
+            String tip = null;
+            if (dn.equals("set") || dn.equals("var")) {
+                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.";
+            } else if (dn.equals("no_escape")) {
+            	tip = "Use #noescape instead.";
+            } else if (dn.equals("method")) {
+            	tip = "Use #function instead.";
+            } else if (dn.equals("head") || dn.equals("template") || dn.equals("fm")) {
+            	tip = "You may meant #ftl.";
+            } else if (dn.equals("try") || dn.equals("atempt")) {
+            	tip = "You may meant #attempt.";
+            } else if (dn.equals("for") || dn.equals("each") || dn.equals("iterate") || dn.equals("iterator")) {
+                tip = "You may meant #list (http://freemarker.org/docs/ref_directive_list.html).";
+            } else if (dn.equals("prefix")) {
+                tip = "You may meant #import. " + PLANNED_DIRECTIVE_HINT;
+            } else if (dn.equals("item") || dn.equals("row") || dn.equals("rows")) {
+                tip = "You may meant #items.";
+            } else if (dn.equals("separator") || dn.equals("separate") || dn.equals("separ")) {
+                tip = "You may meant #sep.";
+            } else {
+                tip = "Help (latest version): http://freemarker.org/docs/ref_directive_alphaidx.html; "
+                        + "you're using FreeMarker " + Configuration.getVersion() + ".";
+            }
+            throw new TokenMgrError(
+                    "Unknown directive: #" + dn + (tip != null ? ". " + tip : ""),
+                    TokenMgrError.LEXICAL_ERROR,
+                    matchedToken.beginLine, matchedToken.beginColumn + 1,
+                    matchedToken.endLine, matchedToken.endColumn);
         }
     }
 }
@@ -3150,12 +3142,8 @@ Macro Macro() :
         // To prevent parser check loopholes like <#list ...><#macro ...><#break></#macro></#list>.
         lastIteratorBlockContexts = iteratorBlockContexts;
         iteratorBlockContexts = null;
-        if (incompatibleImprovements >= _TemplateAPI.VERSION_INT_2_3_23) {
-	        lastBreakableDirectiveNesting = breakableDirectiveNesting;
-	        breakableDirectiveNesting = 0; 
-        } else {
-            lastBreakableDirectiveNesting = 0; // Just to prevent uninitialized local variable error later
-        }
+        lastBreakableDirectiveNesting = breakableDirectiveNesting;
+        breakableDirectiveNesting = 0; 
     }
     children = MixedContentElements()
     (
@@ -3171,9 +3159,7 @@ Macro Macro() :
     )
     {
         iteratorBlockContexts = lastIteratorBlockContexts;
-        if (incompatibleImprovements >= _TemplateAPI.VERSION_INT_2_3_23) {
-            breakableDirectiveNesting = lastBreakableDirectiveNesting;
-        }
+        breakableDirectiveNesting = lastBreakableDirectiveNesting;
         
         inMacro = inFunction = false;
         Macro result = new Macro(name, argNames, args, catchAll, isFunction, children);
@@ -3876,8 +3862,7 @@ Token UnparsedContent(Token start, StringBuilder buf) :
     )+
     {
         buf.setLength(buf.length() - t.image.length());
-        if (!t.image.endsWith(";")
-                && _TemplateAPI.getTemplateLanguageVersionAsInt(template) >= _TemplateAPI.VERSION_INT_2_3_21) {
+        if (!t.image.endsWith(";")) {
             throw new ParseException("Unclosed \"" + start.image + "\"", template, start);
         }
         return t;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/manual/en_US/FM3-CHANGE-LOG.txt
----------------------------------------------------------------------
diff --git a/src/manual/en_US/FM3-CHANGE-LOG.txt b/src/manual/en_US/FM3-CHANGE-LOG.txt
index 5d2ae0d..374e845 100644
--- a/src/manual/en_US/FM3-CHANGE-LOG.txt
+++ b/src/manual/en_US/FM3-CHANGE-LOG.txt
@@ -85,5 +85,7 @@ the FreeMarer 3 changelog here:
   renamed to _StringUtil, thus people won't accidentally use it when they wanted to autocomplete to Apache Commons
   StringUtil). Created published static utility class, o.a.f.core.util.FTLUtil, which contains some methods moved
   over from the now internal utility classes.
-- Deleted o.a.f..core.util.DOMNodeModel
-- All CacheStorage-s must be thread safe from now on (removed ConcurrentCacheStorage marker interface)
\ No newline at end of file
+- Deleted o.a.f.core.util.DOMNodeModel (it has noting to do with the standard XML support, o.a.f.core.model.dom)
+- All CacheStorage-s must be thread safe from now on (removed ConcurrentCacheStorage marker interface)
+- Removed support for incompatibleImprovements before 3.0.0. So currently 3.0.0 is the only support value.
+- Changed the default of logTemplateExceptions to false.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ConfigurationTest.java b/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
index 153cc26..b5f2b8b 100644
--- a/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
+++ b/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
@@ -69,7 +69,6 @@ import org.apache.freemarker.core.ast.XMLOutputFormat;
 import org.apache.freemarker.core.model.TemplateModelException;
 import org.apache.freemarker.core.model.TemplateScalarModel;
 import org.apache.freemarker.core.model.impl.DefaultObjectWrapper;
-import org.apache.freemarker.core.model.impl.SimpleObjectWrapper;
 import org.apache.freemarker.core.model.impl.SimpleScalar;
 import org.apache.freemarker.core.model.impl._StaticObjectWrappers;
 import org.apache.freemarker.core.model.impl.beans.BeansWrapperBuilder;
@@ -104,98 +103,21 @@ public class ConfigurationTest extends TestCase {
     public ConfigurationTest(String name) {
         super(name);
     }
-    
-    public void testIncompatibleImprovementsChangesDefaults() {
-        Version newVersion = Configuration.VERSION_2_3_21;
-        Version oldVersion = Configuration.VERSION_2_3_20;
-        
-        Configuration cfg = new Configuration();
-        assertUsesLegacyObjectWrapper(cfg);
-        assertEquals(cfg.getIncompatibleImprovements(), Configuration.VERSION_2_3_0);
-        
-        cfg.setIncompatibleImprovements(newVersion);
-        assertUsesNewObjectWrapper(cfg);
-        assertUsesNewTemplateLoader(cfg);
-        
-        cfg.setIncompatibleImprovements(oldVersion);
-        assertUsesLegacyObjectWrapper(cfg);
-        cfg.setIncompatibleImprovements(oldVersion);
-        assertUsesLegacyObjectWrapper(cfg);
-        
-        cfg.setIncompatibleImprovements(newVersion);
-        assertUsesNewObjectWrapper(cfg);
-        assertUsesNewTemplateLoader(cfg);
-        cfg.setIncompatibleImprovements(newVersion);
-        assertUsesNewObjectWrapper(cfg);
-        assertUsesNewTemplateLoader(cfg);
-        
-        cfg.setObjectWrapper(new SimpleObjectWrapper(Configuration.VERSION_2_3_0));
-        cfg.setIncompatibleImprovements(oldVersion);
-        assertSame(SimpleObjectWrapper.class, cfg.getObjectWrapper().getClass());
-        
-        cfg.setTemplateLoader(new StringTemplateLoader());
-        cfg.setIncompatibleImprovements(newVersion);
-        assertSame(SimpleObjectWrapper.class, cfg.getObjectWrapper().getClass());
-        assertSame(StringTemplateLoader.class, cfg.getTemplateLoader().getClass());
-        
-        cfg.setIncompatibleImprovements(oldVersion);
-        assertSame(SimpleObjectWrapper.class, cfg.getObjectWrapper().getClass());
-        assertSame(StringTemplateLoader.class, cfg.getTemplateLoader().getClass());
-
-        cfg.setObjectWrapper(_StaticObjectWrappers.DEFAULT_OBJECT_WRAPPER);
-        cfg.setIncompatibleImprovements(newVersion);
-        assertSame(_StaticObjectWrappers.DEFAULT_OBJECT_WRAPPER, cfg.getObjectWrapper());
-        assertSame(StringTemplateLoader.class, cfg.getTemplateLoader().getClass());
-        
-        cfg.unsetObjectWrapper();
-        assertUsesNewObjectWrapper(cfg);
-        cfg.unsetTemplateLoader();
-        assertUsesNewTemplateLoader(cfg);
-
-        cfg.setIncompatibleImprovements(oldVersion);
-        assertUsesLegacyObjectWrapper(cfg);
-
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_22);
-        assertUses2322ObjectWrapper(cfg);
-        assertUsesNewTemplateLoader(cfg);
-        
-        // ---
-        
-        cfg = new Configuration(newVersion);
-        assertUsesNewObjectWrapper(cfg);
-        assertUsesNewTemplateLoader(cfg);
-        
-        cfg.setIncompatibleImprovements(oldVersion);
-        assertUsesLegacyObjectWrapper(cfg);
-        
-        // ---
-        
-        cfg = new Configuration(Configuration.VERSION_2_3_22);
-        assertUses2322ObjectWrapper(cfg);
-        assertUsesNewTemplateLoader(cfg);
-    }
 
-    private void assertUses2322ObjectWrapper(Configuration cfg) {
-        Object ow = cfg.getObjectWrapper();
-        assertEquals(DefaultObjectWrapper.class, ow.getClass());
-        assertEquals(Configuration.VERSION_2_3_22,
-                ((DefaultObjectWrapper) cfg.getObjectWrapper()).getIncompatibleImprovements());
-    }
-    
     public void testUnsetAndIsExplicitlySet() {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         assertFalse(cfg.isLogTemplateExceptionsExplicitlySet());
-        assertTrue(cfg.getLogTemplateExceptions());
+        assertFalse(cfg.getLogTemplateExceptions());
         //
-        cfg.setLogTemplateExceptions(false);
+        cfg.setLogTemplateExceptions(true);
         assertTrue(cfg.isLogTemplateExceptionsExplicitlySet());
-        assertFalse(cfg.getLogTemplateExceptions());
+        assertTrue(cfg.getLogTemplateExceptions());
         //
         for (int i = 0; i < 2; i++) {
             cfg.unsetLogTemplateExceptions();
             assertFalse(cfg.isLogTemplateExceptionsExplicitlySet());
-            assertTrue(cfg.getLogTemplateExceptions());
+            assertFalse(cfg.getLogTemplateExceptions());
         }
         
         assertFalse(cfg.isObjectWrapperExplicitlySet());
@@ -298,7 +220,7 @@ public class ConfigurationTest extends TestCase {
 
     private void assertUsesNewObjectWrapper(Configuration cfg) {
         assertEquals(
-                Configuration.VERSION_2_3_21,
+                Configuration.VERSION_3_0_0,
                 ((DefaultObjectWrapper) cfg.getObjectWrapper()).getIncompatibleImprovements());
     }
     
@@ -308,7 +230,7 @@ public class ConfigurationTest extends TestCase {
     
     public void testVersion() {
         Version v = Configuration.getVersion();
-        assertTrue(v.intValue() > _TemplateAPI.VERSION_INT_2_3_20);
+        assertTrue(v.intValue() >= _TemplateAPI.VERSION_INT_3_0_0);
         assertSame(v.toString(), Configuration.getVersionNumber());
         
         try {
@@ -318,14 +240,14 @@ public class ConfigurationTest extends TestCase {
         }
         
         try {
-            new Configuration(new Version(2, 2, 2));
+            new Configuration(new Version(2, 3, 0));
         } catch (IllegalArgumentException e) {
-            assertThat(e.getMessage(), containsString("2.3.0"));
+            assertThat(e.getMessage(), containsString("3.0.0"));
         }
     }
     
     public void testShowErrorTips() throws Exception {
-        Configuration cfg = new Configuration();
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         try {
             new Template(null, "${x}", cfg).process(null, _NullWriter.INSTANCE);
             fail();
@@ -354,7 +276,7 @@ public class ConfigurationTest extends TestCase {
         final String tUtf8Ftl = "t-utf8.ftl";
         final Integer custLookupCond = 123;
         
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         cfg.setLocale(Locale.GERMAN);
         cfg.setDefaultEncoding(latin1);
         cfg.setEncoding(hu, latin2);
@@ -697,23 +619,23 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testChangingTemplateNameFormatHasEffect() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         StringTemplateLoader tl = new StringTemplateLoader();
         tl.putTemplate("a/b.ftl", "In a/b.ftl");
         tl.putTemplate("b.ftl", "In b.ftl");
         cfg.setTemplateLoader(tl);
-        
+
         {
+            cfg.setTemplateNameFormat(DefaultTemplateNameFormatFM2.INSTANCE);
             final Template template = cfg.getTemplate("a/./../b.ftl");
             assertEquals("a/b.ftl", template.getName());
             assertEquals("a/b.ftl", template.getSourceName());
             assertEquals("In a/b.ftl", template.toString());
         }
         
-        cfg.setTemplateNameFormat(DefaultTemplateNameFormat.INSTANCE);
-        
         {
+            cfg.setTemplateNameFormat(DefaultTemplateNameFormat.INSTANCE);
             final Template template = cfg.getTemplate("a/./../b.ftl");
             assertEquals("b.ftl", template.getName());
             assertEquals("b.ftl", template.getSourceName());
@@ -722,7 +644,7 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testTemplateNameFormatSetSetting() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         assertSame(DefaultTemplateNameFormatFM2.INSTANCE, cfg.getTemplateNameFormat());
         cfg.setSetting(Configuration.TEMPLATE_NAME_FORMAT_KEY, "defAult_2_4_0");
         assertSame(DefaultTemplateNameFormat.INSTANCE, cfg.getTemplateNameFormat());
@@ -734,44 +656,37 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testObjectWrapperSetSetting() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_20);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         {
             cfg.setSetting(Configurable.OBJECT_WRAPPER_KEY, "defAult");
             assertSame(_StaticObjectWrappers.DEFAULT_OBJECT_WRAPPER, cfg.getObjectWrapper());
-        }
-        
-        {
-            cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_22);
-            assertNotSame(_StaticObjectWrappers.DEFAULT_OBJECT_WRAPPER, cfg.getObjectWrapper());
             DefaultObjectWrapper dow = (DefaultObjectWrapper) cfg.getObjectWrapper();
-            assertEquals(Configuration.VERSION_2_3_22, dow.getIncompatibleImprovements());
-            assertTrue(dow.getForceLegacyNonListCollections());
+            assertEquals(Configuration.VERSION_3_0_0, dow.getIncompatibleImprovements());
         }
         
         {
-            cfg.setSetting(Configurable.OBJECT_WRAPPER_KEY, "defAult_2_3_0");
-            assertSame(_StaticObjectWrappers.DEFAULT_OBJECT_WRAPPER, cfg.getObjectWrapper());
+            cfg.setSetting(Configurable.OBJECT_WRAPPER_KEY, "simple");
+            assertSame(_StaticObjectWrappers.SIMPLE_OBJECT_WRAPPER, cfg.getObjectWrapper());
         }
         
         {
             cfg.setSetting(Configurable.OBJECT_WRAPPER_KEY,
-                    "DefaultObjectWrapper(2.3.21, useAdaptersForContainers=true, forceLegacyNonListCollections=false)");
+                    "DefaultObjectWrapper(3.0.0, useAdaptersForContainers=true, forceLegacyNonListCollections=false)");
             DefaultObjectWrapper dow = (DefaultObjectWrapper) cfg.getObjectWrapper();
-            assertEquals(Configuration.VERSION_2_3_21, dow.getIncompatibleImprovements());
+            assertEquals(Configuration.VERSION_3_0_0, dow.getIncompatibleImprovements());
             assertFalse(dow.getForceLegacyNonListCollections());
         }
         
         {
             cfg.setSetting(Configurable.OBJECT_WRAPPER_KEY, "defAult");
             DefaultObjectWrapper dow = (DefaultObjectWrapper) cfg.getObjectWrapper();
-            assertEquals(Configuration.VERSION_2_3_22, dow.getIncompatibleImprovements());
             assertTrue(dow.getForceLegacyNonListCollections());
         }
     }
     
     public void testTemplateLookupStrategyDefaultAndSet() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         assertSame(DefaultTemplateLookupStrategy.INSTANCE, cfg.getTemplateLookupStrategy());
         
         cfg.setClassForTemplateLoading(ConfigurationTest.class, "");
@@ -806,7 +721,7 @@ public class ConfigurationTest extends TestCase {
     }
     
     public void testSetTemplateConfigurations() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_23);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         assertNull(cfg.getTemplateConfigurations());
 
         StringTemplateLoader tl = new StringTemplateLoader();
@@ -867,7 +782,7 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testSetAutoEscaping() throws Exception {
-       Configuration cfg = new Configuration();
+       Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
     
        assertEquals(Configuration.ENABLE_IF_DEFAULT_AUTO_ESCAPING_POLICY, cfg.getAutoEscapingPolicy());
 
@@ -904,7 +819,7 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testSetOutputFormat() throws Exception {
-       Configuration cfg = new Configuration();
+       Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
        
        assertEquals(UndefinedOutputFormat.INSTANCE, cfg.getOutputFormat());
        assertFalse(cfg.isOutputFormatExplicitlySet());
@@ -942,7 +857,7 @@ public class ConfigurationTest extends TestCase {
     
     @Test
     public void testGetOutputFormatByName() throws Exception {
-        Configuration cfg = new Configuration();
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         assertSame(HTMLOutputFormat.INSTANCE, cfg.getOutputFormat(HTMLOutputFormat.INSTANCE.getName()));
         
@@ -995,7 +910,7 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testSetRegisteredCustomOutputFormats() throws Exception {
-        Configuration cfg = new Configuration();
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         assertTrue(cfg.getRegisteredCustomOutputFormats().isEmpty());
         
@@ -1014,38 +929,30 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testSetRecognizeStandardFileExtensions() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_23);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
      
-        assertFalse(cfg.getRecognizeStandardFileExtensions());
+        assertTrue(cfg.getRecognizeStandardFileExtensions());
         assertFalse(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
 
-        cfg.setRecognizeStandardFileExtensions(true);
-        assertTrue(cfg.getRecognizeStandardFileExtensions());
+        cfg.setRecognizeStandardFileExtensions(false);
+        assertFalse(cfg.getRecognizeStandardFileExtensions());
         assertTrue(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
      
         cfg.unsetRecognizeStandardFileExtensions();
-        assertFalse(cfg.getRecognizeStandardFileExtensions());
+        assertTrue(cfg.getRecognizeStandardFileExtensions());
         assertFalse(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
+        
+        cfg.setRecognizeStandardFileExtensions(true);
+        assertTrue(cfg.getRecognizeStandardFileExtensions());
+        assertTrue(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
      
         cfg.setSetting(Configuration.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE, "false");
         assertFalse(cfg.getRecognizeStandardFileExtensions());
         assertTrue(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
         
         cfg.setSetting(Configuration.RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE, "default");
-        assertFalse(cfg.getRecognizeStandardFileExtensions());
-        assertFalse(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
-        
-        cfg.unsetRecognizeStandardFileExtensions();
-        assertFalse(cfg.getRecognizeStandardFileExtensions());
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_24);
         assertTrue(cfg.getRecognizeStandardFileExtensions());
         assertFalse(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_23);
-        assertFalse(cfg.getRecognizeStandardFileExtensions());
-        cfg.setRecognizeStandardFileExtensions(false);
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_24);
-        assertFalse(cfg.getRecognizeStandardFileExtensions());
-        assertTrue(cfg.isRecognizeStandardFileExtensionsExplicitlySet());
      }
     
     public void testSetTimeZone() throws TemplateException {
@@ -1054,7 +961,7 @@ public class ConfigurationTest extends TestCase {
             TimeZone sysDefTZ = TimeZone.getTimeZone("GMT-01");
             TimeZone.setDefault(sysDefTZ);
             
-            Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+            Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
             assertEquals(sysDefTZ, cfg.getTimeZone());
             assertEquals(sysDefTZ.getID(), cfg.getSetting(Configurable.TIME_ZONE_KEY));
             cfg.setSetting(Configurable.TIME_ZONE_KEY, "JVM default");
@@ -1079,7 +986,7 @@ public class ConfigurationTest extends TestCase {
             TimeZone sysDefTZ = TimeZone.getTimeZone("GMT-01");
             TimeZone.setDefault(sysDefTZ);
             
-            Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+            Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
             assertNull(cfg.getSQLDateAndTimeTimeZone());
             assertEquals("null", cfg.getSetting(Configurable.SQL_DATE_AND_TIME_TIME_ZONE_KEY));
             
@@ -1100,7 +1007,7 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testTimeZoneLayers() throws TemplateException, IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         Template t = new Template(null, "", cfg);
         Environment env1 = t.createProcessingEnvironment(null, new StringWriter());
         Environment env2 = t.createProcessingEnvironment(null, new StringWriter());
@@ -1183,19 +1090,19 @@ public class ConfigurationTest extends TestCase {
     public void testSetICIViaSetSettingAPI() throws TemplateException {
         Configuration cfg = new Configuration();
         assertEquals(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS, cfg.getIncompatibleImprovements());
-        cfg.setSetting(Configuration.INCOMPATIBLE_IMPROVEMENTS, "2.3.21");
-        assertEquals(Configuration.VERSION_2_3_21, cfg.getIncompatibleImprovements());
+        cfg.setSetting(Configuration.INCOMPATIBLE_IMPROVEMENTS, "3.0.0"); // This is the only valid value ATM...
+        assertEquals(Configuration.VERSION_3_0_0, cfg.getIncompatibleImprovements());
     }
 
     public void testSetLogTemplateExceptionsViaSetSettingAPI() throws TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
-        assertEquals(true, cfg.getLogTemplateExceptions());
-        cfg.setSetting(Configurable.LOG_TEMPLATE_EXCEPTIONS_KEY, "false");
-        assertEquals(false, cfg.getLogTemplateExceptions());
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
+        assertFalse(cfg.getLogTemplateExceptions());
+        cfg.setSetting(Configurable.LOG_TEMPLATE_EXCEPTIONS_KEY, "true");
+        assertTrue(cfg.getLogTemplateExceptions());
     }
     
     public void testSharedVariables() throws TemplateModelException {
-        Configuration cfg = new Configuration();
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
 
         cfg.setSharedVariable("erased", "");
         assertNotNull(cfg.getSharedVariable("erased"));
@@ -1226,7 +1133,7 @@ public class ConfigurationTest extends TestCase {
         cfg.setSharedVariable("b", "bbLegacy");
         
         // Cause re-wrapping of variables added via setSharedVaribles:
-        cfg.setObjectWrapper(new BeansWrapperBuilder(Configuration.VERSION_2_3_0).build());
+        cfg.setObjectWrapper(new BeansWrapperBuilder(Configuration.VERSION_3_0_0).build());
 
         {
             TemplateScalarModel aVal = (TemplateScalarModel) cfg.getSharedVariable("a");
@@ -1245,17 +1152,15 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testApiBuiltinEnabled() throws IOException, TemplateException {
-        for (Version v : new Version[] { Configuration.VERSION_2_3_0, Configuration.VERSION_2_3_22 }) {
-            Configuration cfg = new Configuration(v);
-            try {
-                new Template(null, "${1?api}", cfg).process(null, _NullWriter.INSTANCE);
-                fail();
-            } catch (TemplateException e) {
-                assertThat(e.getMessage(), containsString(Configurable.API_BUILTIN_ENABLED_KEY));
-            }
-        }
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        try {
+            new Template(null, "${1?api}", cfg).process(null, _NullWriter.INSTANCE);
+            fail();
+        } catch (TemplateException e) {
+            assertThat(e.getMessage(), containsString(Configurable.API_BUILTIN_ENABLED_KEY));
+        }
+            
         cfg.setAPIBuiltinEnabled(true);
         new Template(null, "${m?api.hashCode()}", cfg)
                 .process(Collections.singletonMap("m", new HashMap()), _NullWriter.INSTANCE);
@@ -1263,7 +1168,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testTemplateUpdateDelay() throws IOException, TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
 
         assertEquals(DefaultTemplateResolver.DEFAULT_TEMPLATE_UPDATE_DELAY_MILLIS, cfg.getTemplateUpdateDelayMilliseconds());
         
@@ -1300,7 +1205,7 @@ public class ConfigurationTest extends TestCase {
     @Test
     @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS ", justification = "Testing wrong args")
     public void testSetCustomNumberFormat() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         try {
             cfg.setCustomNumberFormats(null);
@@ -1372,7 +1277,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testSetTabSize() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         String ftl = "${\t}";
         
@@ -1408,7 +1313,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testTabSizeSetting() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         assertEquals(8, cfg.getTabSize());
         cfg.setSetting(Configuration.TAB_SIZE_KEY_CAMEL_CASE, "4");
         assertEquals(4, cfg.getTabSize());
@@ -1426,7 +1331,7 @@ public class ConfigurationTest extends TestCase {
     @SuppressFBWarnings(value="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS", justification="We test failures")
     @Test
     public void testSetCustomDateFormat() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         try {
             cfg.setCustomDateFormats(null);
@@ -1498,7 +1403,7 @@ public class ConfigurationTest extends TestCase {
     
     @Test
     public void testHasCustomFormats() throws IOException, TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         Template t = new Template(null, "", cfg);
         Environment env = t.createProcessingEnvironment(null, null);
         assertFalse(cfg.hasCustomFormats());
@@ -1562,7 +1467,7 @@ public class ConfigurationTest extends TestCase {
     }
     
     public void testNamingConventionSetSetting() throws TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
 
         assertEquals(Configuration.AUTO_DETECT_NAMING_CONVENTION, cfg.getNamingConvention());
         
@@ -1577,7 +1482,7 @@ public class ConfigurationTest extends TestCase {
     }
 
     public void testLazyImportsSetSetting() throws TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
 
         assertFalse(cfg.getLazyImports());
         assertTrue(cfg.isLazyImportsSet());
@@ -1588,7 +1493,7 @@ public class ConfigurationTest extends TestCase {
     }
     
     public void testLazyAutoImportsSetSetting() throws TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
 
         assertNull(cfg.getLazyAutoImports());
         assertTrue(cfg.isLazyAutoImportsSet());
@@ -1604,7 +1509,7 @@ public class ConfigurationTest extends TestCase {
     
     @Test
     public void testGetSettingNamesAreSorted() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         for (boolean camelCase : new boolean[] { false, true }) {
             List<String> names = new ArrayList<>(cfg.getSettingNames(camelCase));
             List<String> cfgableNames = new ArrayList<>(new Template(null, "", cfg).getSettingNames(camelCase));
@@ -1623,7 +1528,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testGetSettingNamesNameConventionsContainTheSame() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         ConfigurableTest.testGetSettingNamesNameConventionsContainTheSame(
                 new ArrayList<>(cfg.getSettingNames(false)),
                 new ArrayList<>(cfg.getSettingNames(true)));
@@ -1631,7 +1536,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testStaticFieldKeysCoverAllGetSettingNames() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         List<String> names = new ArrayList<>(cfg.getSettingNames(false));
         List<String> cfgableNames = new ArrayList<>(cfg.getSettingNames(false));
         assertStartsWith(names, cfgableNames);
@@ -1644,7 +1549,7 @@ public class ConfigurationTest extends TestCase {
     
     @Test
     public void testGetSettingNamesCoversAllStaticKeyFields() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         Collection<String> names = cfg.getSettingNames(false);
         
         for (Class<? extends Configurable> cfgableClass : new Class[] { Configuration.class, Configurable.class }) {
@@ -1664,7 +1569,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testGetSettingNamesCoversAllSettingNames() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         Collection<String> names = cfg.getSettingNames(false);
         
         for (Field f : Configurable.class.getFields()) {
@@ -1677,7 +1582,7 @@ public class ConfigurationTest extends TestCase {
 
     @Test
     public void testSetSettingSupportsBothNamingConventions() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         cfg.setSetting(Configuration.DEFAULT_ENCODING_KEY_CAMEL_CASE, "UTF-16LE");
         assertEquals("UTF-16LE", cfg.getDefaultEncoding());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/CustomAttributeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/CustomAttributeTest.java b/src/test/java/org/apache/freemarker/core/CustomAttributeTest.java
index 3f314e8..6ee16cc 100644
--- a/src/test/java/org/apache/freemarker/core/CustomAttributeTest.java
+++ b/src/test/java/org/apache/freemarker/core/CustomAttributeTest.java
@@ -19,7 +19,11 @@
 
 package org.apache.freemarker.core;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
 
 import java.math.BigDecimal;
 import java.util.Arrays;
@@ -55,7 +59,7 @@ public class CustomAttributeTest {
     
     @Test
     public void testStringKey() throws Exception {
-        Template t = new Template(null, "", new Configuration(Configuration.VERSION_2_3_22));
+        Template t = new Template(null, "", new Configuration(Configuration.VERSION_3_0_0));
         assertEquals(0, t.getCustomAttributeNames().length);        
         assertNull(t.getCustomAttribute(KEY_1));
         
@@ -86,7 +90,7 @@ public class CustomAttributeTest {
 
     @Test
     public void testRemoveFromEmptySet() throws Exception {
-        Template t = new Template(null, "", new Configuration(Configuration.VERSION_2_3_22));
+        Template t = new Template(null, "", new Configuration(Configuration.VERSION_3_0_0));
         t.removeCustomAttribute(KEY_1);
         assertEquals(0, t.getCustomAttributeNames().length);        
         assertNull(t.getCustomAttribute(KEY_1));
@@ -102,7 +106,7 @@ public class CustomAttributeTest {
                 + "'" + KEY_1 + "': [ 's', 2, true, {  'a': 'A' } ], "
                 + "'" + KEY_2 + "': " + VALUE_BIGDECIMAL + " "
                 + "}>",
-                new Configuration(Configuration.VERSION_2_3_22));
+                new Configuration(Configuration.VERSION_3_0_0));
         
         assertArrayEquals(new String[] { KEY_1, KEY_2 }, sort(t.getCustomAttributeNames()));
         assertEquals(VALUE_LIST, t.getCustomAttribute(KEY_1));
@@ -120,7 +124,7 @@ public class CustomAttributeTest {
                 + "'" + KEY_2 + "': 'b', "
                 + "'" + KEY_3 + "': 'c' "
                 + "}>",
-                new Configuration(Configuration.VERSION_2_3_22));
+                new Configuration(Configuration.VERSION_3_0_0));
         
         assertArrayEquals(new String[] { KEY_1, KEY_2, KEY_3 }, sort(t.getCustomAttributeNames()));
         assertEquals("a", t.getCustomAttribute(KEY_1));
@@ -141,7 +145,7 @@ public class CustomAttributeTest {
                 + "'" + KEY_2 + "': 'b', "
                 + "'" + KEY_3 + "': 'c' "
                 + "}>",
-                new Configuration(Configuration.VERSION_2_3_22));
+                new Configuration(Configuration.VERSION_3_0_0));
         
         assertArrayEquals(new String[] { KEY_1, KEY_2, KEY_3 }, sort(t.getCustomAttributeNames()));
         assertEquals("a", t.getCustomAttribute(KEY_1));
@@ -162,7 +166,7 @@ public class CustomAttributeTest {
 
     @Test
     public void testObjectKey() throws Exception {
-        Template t = new Template(null, "", new Configuration(Configuration.VERSION_2_3_22));
+        Template t = new Template(null, "", new Configuration(Configuration.VERSION_3_0_0));
         assertNull(CUST_ATT_TMP_1.get(t));
         
         CUST_ATT_TMP_1.set(VALUE_1, t);
@@ -194,7 +198,7 @@ public class CustomAttributeTest {
             // Expected
         }
         
-        final Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        final Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         final Template t = new Template(null, "${testScopesFromTemplateStep1()}", cfg);
         Environment env = t.createProcessingEnvironment(this, _NullWriter.INSTANCE);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ExceptionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ExceptionTest.java b/src/test/java/org/apache/freemarker/core/ExceptionTest.java
index c2f2a9f..3dcf97f 100644
--- a/src/test/java/org/apache/freemarker/core/ExceptionTest.java
+++ b/src/test/java/org/apache/freemarker/core/ExceptionTest.java
@@ -19,8 +19,8 @@
 
 package org.apache.freemarker.core;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertThat;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -94,7 +94,7 @@ public class ExceptionTest extends TestCase {
 
     @SuppressWarnings("cast")
     public void testParseExceptionLocationInformation() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_21);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         StringTemplateLoader tl = new StringTemplateLoader();
         tl.putTemplate("foo_en.ftl", "\n\nxxx<#noSuchDirective>");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/GetSourceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/GetSourceTest.java b/src/test/java/org/apache/freemarker/core/GetSourceTest.java
index 4f6e66e..ef2783b 100644
--- a/src/test/java/org/apache/freemarker/core/GetSourceTest.java
+++ b/src/test/java/org/apache/freemarker/core/GetSourceTest.java
@@ -20,16 +20,13 @@ package org.apache.freemarker.core;
 
 import static org.junit.Assert.assertEquals;
 
-import org.apache.freemarker.core.Configuration;
-import org.apache.freemarker.core.Template;
 import org.junit.Test;
 
 public class GetSourceTest {
 
-    
     @Test
     public void testGetSource() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_23);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         {
             // Note: Default tab size is 8.

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/MistakenlyPublicImportAPIsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/MistakenlyPublicImportAPIsTest.java b/src/test/java/org/apache/freemarker/core/MistakenlyPublicImportAPIsTest.java
index 5d742bd..04054ad 100644
--- a/src/test/java/org/apache/freemarker/core/MistakenlyPublicImportAPIsTest.java
+++ b/src/test/java/org/apache/freemarker/core/MistakenlyPublicImportAPIsTest.java
@@ -19,17 +19,19 @@
 
 package org.apache.freemarker.core;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.io.StringWriter;
 import java.util.List;
 
 import org.apache.freemarker.core.ast.Environment;
+import org.apache.freemarker.core.ast.Environment.Namespace;
 import org.apache.freemarker.core.ast.InvalidReferenceException;
 import org.apache.freemarker.core.ast.LibraryLoad;
-import org.apache.freemarker.core.ast.Environment.Namespace;
 import org.apache.freemarker.core.model.TemplateModel;
 import org.apache.freemarker.core.templateresolver.impl.StringTemplateLoader;
 import org.apache.freemarker.core.util._NullWriter;
@@ -42,7 +44,7 @@ public class MistakenlyPublicImportAPIsTest {
 
     @Test
     public void testImportCopying() throws IOException, TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         StringTemplateLoader tl = new StringTemplateLoader();
         tl.putTemplate("imp1", "<#macro m>1</#macro>");
         tl.putTemplate("imp2", "<#assign x = 2><#macro m>${x}</#macro>");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/MistakenlyPublicMacroAPIsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/MistakenlyPublicMacroAPIsTest.java b/src/test/java/org/apache/freemarker/core/MistakenlyPublicMacroAPIsTest.java
index 594af53..21e80c2 100644
--- a/src/test/java/org/apache/freemarker/core/MistakenlyPublicMacroAPIsTest.java
+++ b/src/test/java/org/apache/freemarker/core/MistakenlyPublicMacroAPIsTest.java
@@ -19,8 +19,9 @@
 
 package org.apache.freemarker.core;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
 
 import java.io.IOException;
 import java.io.StringWriter;
@@ -37,7 +38,7 @@ import org.junit.Test;
  */
 public class MistakenlyPublicMacroAPIsTest {
 
-    private final Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+    private final Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
     
     /**
      * Getting the macros from one template, and adding them to another.

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/SimpleObjetWrapperTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/SimpleObjetWrapperTest.java b/src/test/java/org/apache/freemarker/core/SimpleObjetWrapperTest.java
index 977c29a..7d9b00e 100644
--- a/src/test/java/org/apache/freemarker/core/SimpleObjetWrapperTest.java
+++ b/src/test/java/org/apache/freemarker/core/SimpleObjetWrapperTest.java
@@ -19,8 +19,11 @@
 
 package org.apache.freemarker.core;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.IOException;
@@ -34,9 +37,6 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.freemarker.core.Configuration;
-import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core.Version;
 import org.apache.freemarker.core.model.TemplateBooleanModel;
 import org.apache.freemarker.core.model.TemplateCollectionModel;
 import org.apache.freemarker.core.model.TemplateDateModel;
@@ -56,7 +56,7 @@ public class SimpleObjetWrapperTest {
     
     @Test
     public void testDoesNotAllowAPIBuiltin() throws TemplateModelException {
-        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_2_3_22);
+        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_3_0_0);
         
         TemplateModelWithAPISupport map = (TemplateModelWithAPISupport) sow.wrap(new HashMap());
         try {
@@ -70,19 +70,17 @@ public class SimpleObjetWrapperTest {
     @SuppressWarnings("boxing")
     @Test
     public void testCanWrapBasicTypes() throws TemplateModelException {
-        for (Version version : new Version[] { Configuration.VERSION_2_3_0, Configuration.VERSION_2_3_22 }) {
-            SimpleObjectWrapper sow = new SimpleObjectWrapper(version);
-            assertTrue(sow.wrap("s") instanceof TemplateScalarModel);
-            assertTrue(sow.wrap(1) instanceof TemplateNumberModel);
-            assertTrue(sow.wrap(true) instanceof TemplateBooleanModel);
-            assertTrue(sow.wrap(new Date()) instanceof TemplateDateModel);
-            assertTrue(sow.wrap(new ArrayList()) instanceof TemplateSequenceModel);
-            assertTrue(sow.wrap(new String[0]) instanceof TemplateSequenceModel);
-            assertTrue(sow.wrap(new ArrayList().iterator()) instanceof TemplateCollectionModel);
-            assertTrue(sow.wrap(new HashSet()) instanceof TemplateSequenceModel);
-            assertTrue(sow.wrap(new HashMap()) instanceof TemplateHashModelEx);
-            assertNull(sow.wrap(null));
-        }
+        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_3_0_0);
+        assertTrue(sow.wrap("s") instanceof TemplateScalarModel);
+        assertTrue(sow.wrap(1) instanceof TemplateNumberModel);
+        assertTrue(sow.wrap(true) instanceof TemplateBooleanModel);
+        assertTrue(sow.wrap(new Date()) instanceof TemplateDateModel);
+        assertTrue(sow.wrap(new ArrayList()) instanceof TemplateSequenceModel);
+        assertTrue(sow.wrap(new String[0]) instanceof TemplateSequenceModel);
+        assertTrue(sow.wrap(new ArrayList().iterator()) instanceof TemplateCollectionModel);
+        assertTrue(sow.wrap(new HashSet()) instanceof TemplateSequenceModel);
+        assertTrue(sow.wrap(new HashMap()) instanceof TemplateHashModelEx);
+        assertNull(sow.wrap(null));
     }
     
     @Test
@@ -93,7 +91,7 @@ public class SimpleObjetWrapperTest {
         is.setCharacterStream(new StringReader("<doc><sub a='1' /></doc>"));
         Document doc = db.parse(is);
         
-        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_2_3_22);
+        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_3_0_0);
         try {
             sow.wrap(doc);
             fail();
@@ -104,7 +102,7 @@ public class SimpleObjetWrapperTest {
     
     @Test
     public void testWontWrapGenericObjects() {
-        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_2_3_22);
+        SimpleObjectWrapper sow = new SimpleObjectWrapper(Configuration.VERSION_3_0_0);
         try {
             sow.wrap(new File("/x"));
             fail();

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/TemplateConstructorsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/TemplateConstructorsTest.java b/src/test/java/org/apache/freemarker/core/TemplateConstructorsTest.java
index f64128b..5e93fef 100644
--- a/src/test/java/org/apache/freemarker/core/TemplateConstructorsTest.java
+++ b/src/test/java/org/apache/freemarker/core/TemplateConstructorsTest.java
@@ -19,15 +19,16 @@
 
 package org.apache.freemarker.core;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
 
-import org.apache.freemarker.core.Configuration;
-import org.apache.freemarker.core.Template;
 import org.junit.Test;
 public class TemplateConstructorsTest {
 
@@ -36,7 +37,7 @@ public class TemplateConstructorsTest {
     
     @Test
     public void test() throws IOException {
-        final Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        final Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         //cfg.setDefaultEncoding("ISO-8859-1");
         
         final String name = "foo/bar.ftl";

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/TemplateLanguageVersionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/TemplateLanguageVersionTest.java b/src/test/java/org/apache/freemarker/core/TemplateLanguageVersionTest.java
index ab67d25..1c8217a 100644
--- a/src/test/java/org/apache/freemarker/core/TemplateLanguageVersionTest.java
+++ b/src/test/java/org/apache/freemarker/core/TemplateLanguageVersionTest.java
@@ -19,14 +19,13 @@
 
 package org.apache.freemarker.core;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 
-import org.apache.freemarker.core.Configuration;
-import org.apache.freemarker.core.Template;
-import org.apache.freemarker.core.Version;
 import org.apache.freemarker.core.templateresolver.impl.StringTemplateLoader;
 import org.apache.freemarker.test.util.TestUtil;
 import org.junit.Test;
@@ -34,13 +33,9 @@ public class TemplateLanguageVersionTest {
 
     @Test
     public void testDefaultVersion() throws IOException {
-        testDefaultWithVersion(Configuration.VERSION_2_3_0, Configuration.VERSION_2_3_0);
-        testDefaultWithVersion(new Version(2, 3, 18), Configuration.VERSION_2_3_0);
-        testDefaultWithVersion(Configuration.VERSION_2_3_19, Configuration.VERSION_2_3_19);
-        testDefaultWithVersion(Configuration.VERSION_2_3_20, Configuration.VERSION_2_3_20);
-        testDefaultWithVersion(Configuration.VERSION_2_3_21, Configuration.VERSION_2_3_21);
+        testDefaultWithVersion(Configuration.VERSION_3_0_0, Configuration.VERSION_3_0_0);
         try {
-            testDefaultWithVersion(TestUtil.getClosestFutureVersion(), Configuration.VERSION_2_3_21);
+            testDefaultWithVersion(TestUtil.getClosestFutureVersion(), Configuration.VERSION_3_0_0);
             fail("Maybe you need to update this test for the new FreeMarker version");
         } catch (IllegalArgumentException e) {
             assertThat(e.getMessage(), containsString("version"));

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/TemplateLookupStrategyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/TemplateLookupStrategyTest.java b/src/test/java/org/apache/freemarker/core/TemplateLookupStrategyTest.java
index f8b443a..1638ff7 100644
--- a/src/test/java/org/apache/freemarker/core/TemplateLookupStrategyTest.java
+++ b/src/test/java/org/apache/freemarker/core/TemplateLookupStrategyTest.java
@@ -43,7 +43,7 @@ public class TemplateLookupStrategyTest {
 
     @Test
     public void testSetSetting() throws TemplateException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         assertSame(DefaultTemplateLookupStrategy.INSTANCE, cfg.getTemplateLookupStrategy());
 
         cfg.setSetting(Configuration.TEMPLATE_LOOKUP_STRATEGY_KEY, MyTemplateLookupStrategy.class.getName() + "()");
@@ -55,7 +55,7 @@ public class TemplateLookupStrategyTest {
     
     @Test
     public void testCustomStrategy() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         MonitoredTemplateLoader tl = new MonitoredTemplateLoader();
         tl.putTextTemplate("test.ftl", "");
@@ -90,7 +90,7 @@ public class TemplateLookupStrategyTest {
     
     @Test
     public void testDefaultStrategy() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         MonitoredTemplateLoader tl = new MonitoredTemplateLoader();
         tl.putTextTemplate("test.ftl", "");
@@ -260,7 +260,7 @@ public class TemplateLookupStrategyTest {
     
     @Test
     public void testAcquisition() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         MonitoredTemplateLoader tl = new MonitoredTemplateLoader();
         tl.putTextTemplate("t.ftl", "");
@@ -303,11 +303,8 @@ public class TemplateLookupStrategyTest {
     
     @Test
     public void testCustomLookupCondition() throws IOException, TemplateException {
-        testCustomLookup(new Configuration(Configuration.VERSION_2_3_0));
-        testCustomLookup(new Configuration(Configuration.VERSION_2_3_22));
-    }
-
-    private void testCustomLookup(Configuration cfg) throws IOException, TemplateException {
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
+        
         final String iAtDefaultContent = "i at default";
         final String iXxAtDefaultContent = "i_xx at default";
         final String iAtBaazComContent = "i at baaz.com";
@@ -533,7 +530,7 @@ public class TemplateLookupStrategyTest {
     
     @Test
     public void testNonparsed() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         MonitoredTemplateLoader tl = new MonitoredTemplateLoader();
         tl.putTextTemplate("test.txt", "");
@@ -569,7 +566,7 @@ public class TemplateLookupStrategyTest {
 
     @Test
     public void testParseError() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         
         MonitoredTemplateLoader tl = new MonitoredTemplateLoader();
         tl.putTextTemplate("test.ftl", "");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/TemplateNotFoundMessageTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/TemplateNotFoundMessageTest.java b/src/test/java/org/apache/freemarker/core/TemplateNotFoundMessageTest.java
index ff9812c..cd6a0a3 100644
--- a/src/test/java/org/apache/freemarker/core/TemplateNotFoundMessageTest.java
+++ b/src/test/java/org/apache/freemarker/core/TemplateNotFoundMessageTest.java
@@ -29,8 +29,7 @@ import static org.junit.Assert.fail;
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.freemarker.core.Configuration;
-import org.apache.freemarker.core.TemplateNotFoundException;
+import org.apache.freemarker.core.templateresolver.MalformedTemplateNameException;
 import org.apache.freemarker.core.templateresolver.TemplateLoader;
 import org.apache.freemarker.core.templateresolver.TemplateLookupContext;
 import org.apache.freemarker.core.templateresolver.TemplateLookupResult;
@@ -109,20 +108,24 @@ public class TemplateNotFoundMessageTest {
     
     @Test
     public void testOtherMessageDetails() throws IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_0);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         cfg.setTemplateLoader(new StringTemplateLoader());
         
         {
             String errMsg = failWith("../x", cfg);
             showErrorMessage(errMsg);
             assertThat(errMsg,
-                    allOf(containsStringIgnoringCase("reason"), containsStringIgnoringCase("root directory")));
+                    allOf(
+                            containsStringIgnoringCase("Malformed template name"),
+                            containsStringIgnoringCase("root directory")));
         }
         {
             String errMsg = failWith("x\u0000y", cfg);
             showErrorMessage(errMsg);
             assertThat(errMsg,
-                    allOf(containsStringIgnoringCase("reason"), containsStringIgnoringCase("null character")));
+                    allOf(
+                            containsStringIgnoringCase("Malformed template name"),
+                            containsStringIgnoringCase("null character")));
         }
         {
             String errMsg = failWith("x\\y", cfg);
@@ -180,16 +183,16 @@ public class TemplateNotFoundMessageTest {
         try {
             cfg.getTemplate(name);
             fail();
-        } catch (TemplateNotFoundException e) {
+        } catch (TemplateNotFoundException | MalformedTemplateNameException e) {
             return e.getMessage();
         } catch (IOException e) {
-            fail();
+            fail("Unexpected exception: " + e);
         }
         return null;
     }
     
     private String failWith(TemplateLoader tl) {
-        return failWith(tl, "missing.ftl", new Configuration(Configuration.VERSION_2_3_21));
+        return failWith(tl, "missing.ftl", new Configuration(Configuration.VERSION_3_0_0));
     }
 
     private String failWith(Configuration cfg) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/ASTBasedErrorMessagesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/ASTBasedErrorMessagesTest.java b/src/test/java/org/apache/freemarker/core/ast/ASTBasedErrorMessagesTest.java
index 6cb3ffc..62aadb4 100644
--- a/src/test/java/org/apache/freemarker/core/ast/ASTBasedErrorMessagesTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/ASTBasedErrorMessagesTest.java
@@ -27,11 +27,6 @@ import org.junit.Test;
 public class ASTBasedErrorMessagesTest extends TemplateTest {
     
     @Test
-    public void testOverloadSelectionError() {
-        assertErrorContains("${overloads.m(null)}", "2.3.21", "overloaded");
-    }
-    
-    @Test
     public void testInvalidRefBasic() {
         assertErrorContains("${foo}", "foo", "specify a default");
         assertErrorContains("${map[foo]}", "foo", "\\!map[", "specify a default");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/ASTPrinter.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/ASTPrinter.java b/src/test/java/org/apache/freemarker/core/ast/ASTPrinter.java
index 82a37a9..73fc4a4 100644
--- a/src/test/java/org/apache/freemarker/core/ast/ASTPrinter.java
+++ b/src/test/java/org/apache/freemarker/core/ast/ASTPrinter.java
@@ -69,8 +69,7 @@ public class ASTPrinter {
     }
     
     private ASTPrinter() {
-        cfg = new Configuration();
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_20);
+        cfg = new Configuration(Configuration.VERSION_3_0_0);
     }
     
     private void mainSingleTemplate(String[] args) throws IOException, FileNotFoundException {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/BreakPlacementTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/BreakPlacementTest.java b/src/test/java/org/apache/freemarker/core/ast/BreakPlacementTest.java
index ec0398a..0a435ba 100644
--- a/src/test/java/org/apache/freemarker/core/ast/BreakPlacementTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/BreakPlacementTest.java
@@ -56,11 +56,9 @@ public class BreakPlacementTest extends TemplateTest {
     }
 
     @Test
-    public void testInvalidPlacementMacroLoophole() throws IOException, TemplateException {
+    public void testInvalidPlacementInsideMacro() throws IOException, TemplateException {
         final String ftl = "<#list 1..2 as x>${x}<#macro m><#break></#macro></#list>";
-        getConfiguration().setIncompatibleImprovements(Configuration.VERSION_2_3_22);
-        assertOutput(ftl, "12");
-        getConfiguration().setIncompatibleImprovements(Configuration.VERSION_2_3_23);
+        getConfiguration().setIncompatibleImprovements(Configuration.VERSION_3_0_0);
         assertErrorContains(ftl, BREAK_NESTING_ERROR_MESSAGE_PART);
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/CanonicalFormTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/CanonicalFormTest.java b/src/test/java/org/apache/freemarker/core/ast/CanonicalFormTest.java
index 7c584cd..8af0b34 100644
--- a/src/test/java/org/apache/freemarker/core/ast/CanonicalFormTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/CanonicalFormTest.java
@@ -24,7 +24,6 @@ import java.io.StringWriter;
 
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.TemplateNotFoundException;
-import org.apache.freemarker.core.ast.ParseException;
 import org.apache.freemarker.core.templateresolver.MalformedTemplateNameException;
 import org.apache.freemarker.core.templateresolver.impl.ClassTemplateLoader;
 import org.apache.freemarker.test.CopyrightCommentRemoverTemplateLoader;
@@ -58,7 +57,7 @@ public class CanonicalFormTest extends FileTestCase {
     
     private void assertCanonicalFormOf(String ftlFileName)
             throws TemplateNotFoundException, MalformedTemplateNameException, ParseException, IOException {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         cfg.setTemplateLoader(
                 new CopyrightCommentRemoverTemplateLoader(
                         new ClassTemplateLoader(CanonicalFormTest.class, "")));

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java b/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
index a4618a6..c4a6f83 100644
--- a/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
@@ -19,8 +19,12 @@
 
 package org.apache.freemarker.core.ast;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.lang.reflect.Field;
@@ -32,7 +36,6 @@ import java.util.Set;
 
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.Template;
-import org.apache.freemarker.core.ast.Configurable;
 import org.apache.freemarker.core.util._StringUtil;
 import org.junit.Test;
 
@@ -164,7 +167,7 @@ public class ConfigurableTest {
     }
     
     private Configurable createConfigurable() throws IOException {
-        return new Template(null, "", new Configuration(Configuration.VERSION_2_3_22));
+        return new Template(null, "", new Configuration(Configuration.VERSION_3_0_0));
     }
 
     private boolean keyFieldExists(String name) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/DateFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/DateFormatTest.java b/src/test/java/org/apache/freemarker/core/ast/DateFormatTest.java
index a0c7f95..3ac2763 100644
--- a/src/test/java/org/apache/freemarker/core/ast/DateFormatTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/DateFormatTest.java
@@ -18,8 +18,10 @@
  */
 package org.apache.freemarker.core.ast;
 
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertThat;
 
 import java.io.IOException;
 import java.sql.Time;
@@ -32,12 +34,6 @@ import java.util.TimeZone;
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.Template;
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core.ast.AliasTemplateDateFormatFactory;
-import org.apache.freemarker.core.ast.Environment;
-import org.apache.freemarker.core.ast.TemplateConfiguration;
-import org.apache.freemarker.core.ast.TemplateDateFormat;
-import org.apache.freemarker.core.ast.TemplateDateFormatFactory;
-import org.apache.freemarker.core.ast.UndefinedCustomFormatException;
 import org.apache.freemarker.core.model.TemplateDateModel;
 import org.apache.freemarker.core.model.TemplateModelException;
 import org.apache.freemarker.core.model.impl.SimpleDate;
@@ -58,7 +54,7 @@ public class DateFormatTest extends TemplateTest {
     @Before
     public void setup() {
         Configuration cfg = getConfiguration();
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_24);
+        cfg.setIncompatibleImprovements(Configuration.VERSION_3_0_0);
         cfg.setLocale(Locale.US);
         cfg.setTimeZone(TimeZone.getTimeZone("GMT+01:00"));
         cfg.setSQLDateAndTimeTimeZone(TimeZone.getTimeZone("UTC"));
@@ -212,38 +208,19 @@ public class DateFormatTest extends TemplateTest {
         Configuration cfg = getConfiguration();
         addToDataModel("d", new SimpleDate(new Date(12345678L), TemplateDateModel.DATETIME));
         
-        testIcIAndEscapingWhenCustFormsAreAccepted(cfg);
-        
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_23);
-        testIcIAndEscapingWhenCustFormsAreAccepted(cfg);
-        
-        cfg.setCustomDateFormats(Collections.<String, TemplateDateFormatFactory>emptyMap());
-        
         cfg.setDateTimeFormat("@epoch");
-        assertErrorContains("${d}", "\"@epoch\"");
+        assertOutput("${d}", "12345678");
         cfg.setDateTimeFormat("'@'yyyy");
         assertOutput("${d}", "@1970");
         cfg.setDateTimeFormat("@@yyyy");
         assertOutput("${d}", "@@1970");
         
-        cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_24);
+        cfg.setCustomDateFormats(Collections.<String, TemplateDateFormatFactory>emptyMap());
+        
         cfg.setDateTimeFormat("@epoch");
         assertErrorContains("${d}", "custom", "\"epoch\"");
-        cfg.setDateTimeFormat("'@'yyyy");
-        assertOutput("${d}", "@1970");
-        cfg.setDateTimeFormat("@@yyyy");
-        assertOutput("${d}", "@@1970");
     }
 
-    protected void testIcIAndEscapingWhenCustFormsAreAccepted(Configuration cfg) throws IOException, TemplateException {
-        cfg.setDateTimeFormat("@epoch");
-        assertOutput("${d}", "12345678");
-        cfg.setDateTimeFormat("'@'yyyy");
-        assertOutput("${d}", "@1970");
-        cfg.setDateTimeFormat("@@yyyy");
-        assertOutput("${d}", "@@1970");
-    }
-    
     @Test
     public void testEnvironmentGetters() throws Exception {
         Template t = new Template(null, "", getConfiguration());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java b/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
index 24e0a31..142552b 100644
--- a/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
@@ -28,10 +28,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.TemplateException;
-import org.apache.freemarker.core.ast.CallPlaceCustomDataInitializationException;
-import org.apache.freemarker.core.ast.DirectiveCallPlace;
-import org.apache.freemarker.core.ast.Environment;
-import org.apache.freemarker.core.ast.UnifiedCall;
 import org.apache.freemarker.core.model.TemplateDirectiveBody;
 import org.apache.freemarker.core.model.TemplateDirectiveModel;
 import org.apache.freemarker.core.model.TemplateModel;
@@ -45,7 +41,7 @@ public class DirectiveCallPlaceTest extends TemplateTest {
     
     @Override
     protected Configuration createConfiguration() {
-        return new Configuration(Configuration.VERSION_2_3_22);
+        return new Configuration(Configuration.VERSION_3_0_0);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/EncodingOverrideTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/EncodingOverrideTest.java b/src/test/java/org/apache/freemarker/core/ast/EncodingOverrideTest.java
index 90c72f8..ed4a190 100644
--- a/src/test/java/org/apache/freemarker/core/ast/EncodingOverrideTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/EncodingOverrideTest.java
@@ -19,7 +19,7 @@
 
 package org.apache.freemarker.core.ast;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
 import java.io.StringWriter;
@@ -60,7 +60,7 @@ public class EncodingOverrideTest {
     }
     
     private Configuration createConfig(String charset) {
-       Configuration cfg = new Configuration(Configuration.VERSION_2_3_21);
+       Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
        cfg.setClassForTemplateLoading(EncodingOverrideTest.class, "");
        cfg.setDefaultEncoding(charset);
        return cfg;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/EnvironmentCustomStateTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/EnvironmentCustomStateTest.java b/src/test/java/org/apache/freemarker/core/ast/EnvironmentCustomStateTest.java
index 38722be..9bd9480 100644
--- a/src/test/java/org/apache/freemarker/core/ast/EnvironmentCustomStateTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/EnvironmentCustomStateTest.java
@@ -18,11 +18,11 @@
  */
 package org.apache.freemarker.core.ast;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.Template;
-import org.apache.freemarker.core.ast.Environment;
 import org.junit.Test;
 
 public class EnvironmentCustomStateTest {
@@ -32,7 +32,7 @@ public class EnvironmentCustomStateTest {
 
     @Test
     public void test() throws Exception {
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_24);
+        Configuration cfg = new Configuration(Configuration.VERSION_3_0_0);
         Template t = new Template(null, "", cfg);
         Environment env = t.createProcessingEnvironment(null, null);
         assertNull(env.getCustomState(KEY_1));

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/8ba7883e/src/test/java/org/apache/freemarker/core/ast/EnvironmentGetTemplateVariantsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/EnvironmentGetTemplateVariantsTest.java b/src/test/java/org/apache/freemarker/core/ast/EnvironmentGetTemplateVariantsTest.java
index 2243e6f..1359f18 100644
--- a/src/test/java/org/apache/freemarker/core/ast/EnvironmentGetTemplateVariantsTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/EnvironmentGetTemplateVariantsTest.java
@@ -19,7 +19,7 @@
 
 package org.apache.freemarker.core.ast;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertSame;
 
 import java.io.IOException;
 import java.io.Writer;
@@ -30,7 +30,6 @@ import org.apache.freemarker.core.Configuration;
 import org.apache.freemarker.core.Template;
 import org.apache.freemarker.core.TemplateException;
 import org.apache.freemarker.core.Version;
-import org.apache.freemarker.core.ast.Environment;
 import org.apache.freemarker.core.model.TemplateDirectiveBody;
 import org.apache.freemarker.core.model.TemplateDirectiveModel;
 import org.apache.freemarker.core.model.TemplateModel;
@@ -125,74 +124,67 @@ public class EnvironmentGetTemplateVariantsTest extends TemplateTest {
                 );
     }
     
-    private final static String EXPECTED_2_3_21 =
-            "<t=main ct=main mt=main>\n"
-            + "---1---\n"
-            + "[imp: <t=imp ct=imp mt=main>]\n"
-            + "---2---\n"
-            + "[impM: <t=main ct=imp mt=main>\n"
-                + "{<t=main ct=main mt=main>}\n"
-                + "[inc: <t=inc ct=inc mt=main>\n"
-                    + "[incM: <t=inc ct=inc mt=main> {<t=imp ct=inc mt=main>}]\n"
-                    + "[incInc: <t=inc ct=inc mt=main>\n"
-                        + "[incM: <t=inc ct=inc mt=main> {<t=imp ct=inc mt=main>}]\n"
+    @Test
+    public void test() throws IOException, TemplateException {
+        setConfiguration(createConfiguration(Configuration.VERSION_3_0_0));
+        assertOutputForNamed(
+                "main",
+                "<t=main ct=main mt=main>\n"
+                + "---1---\n"
+                + "[imp: <t=main ct=imp mt=main>]\n"
+                + "---2---\n"
+                + "[impM: <t=main ct=imp mt=main>\n"
+                    + "{<t=main ct=main mt=main>}\n"
+                    + "[inc: <t=main ct=inc mt=main>\n"
+                        + "[incM: <t=main ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
+                        + "[incInc: <t=main ct=inc mt=main>\n"
+                            + "[incM: <t=main ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
+                        + "]\n"
                     + "]\n"
+                    + "[incM: <t=main ct=inc mt=main> {<t=main ct=imp mt=main>}]\n"
                 + "]\n"
-                + "[incM: <t=main ct=inc mt=main> {<t=imp ct=imp mt=main>}]\n"
-            + "]\n"
-            + "---3---\n"
-            + "[inc: <t=inc ct=inc mt=main>\n"
-                + "[incM: <t=inc ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
-                + "[incInc: <t=inc ct=inc mt=main>\n"
-                    + "[incM: <t=inc ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
+                + "---3---\n"
+                + "[inc: <t=main ct=inc mt=main>\n"
+                    + "[incM: <t=main ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
+                    + "[incInc: <t=main ct=inc mt=main>\n"
+                        + "[incM: <t=main ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
+                    + "]\n"
                 + "]\n"
-            + "]\n"
-            + "---4---\n"
-            + "[incM: <t=main ct=inc mt=main> {<t=main ct=main mt=main>}]\n"
-            + "---5---\n"
-            + "[inc2: <t=inc2 ct=inc2 mt=main>\n"
-                + "[impM: <t=inc2 ct=imp mt=main>\n"
-                    + "{<t=main ct=inc2 mt=main>}\n"
-                    + "[inc: <t=inc ct=inc mt=main>\n"
-                        + "[incM: <t=inc ct=inc mt=main> {<t=imp ct=inc mt=main>}]\n"
+                + "---4---\n"
+                + "[incM: <t=main ct=inc mt=main> {<t=main ct=main mt=main>}]\n"
+                + "---5---\n"
+                + "[inc2: <t=main ct=inc2 mt=main>\n"
+                    + "[impM: <t=main ct=imp mt=main>\n"
+                        + "{<t=main ct=inc2 mt=main>}\n"
+                        + "[inc: <t=main ct=inc mt=main>\n"
+                            + "[incM: <t=main ct=inc mt=main> {<t=main ct=inc mt=main>}]\n"
+                        + "]\n"
+                        + "[incM: <t=main ct=inc mt=main> {<t=main ct=imp mt=main>}]\n"
                     + "]\n"
-                    + "[incM: <t=inc2 ct=inc mt=main> {<t=imp ct=imp mt=main>}]\n"
                 + "]\n"
-            + "]\n"
-            + "---6---\n"
-            + "[impM2: <t=main ct=imp mt=main>\n"
-                + "{<t=main ct=main mt=main>}\n"
-                + "[imp2M: <t=main ct=imp2 mt=main> {<t=imp ct=imp mt=main>}]\n"
-            + "]\n"
-            + "---7---\n"
-            + "[inc3: <t=inc3 ct=inc3 mt=main>\n"
-                + "[mainM: <t=inc3 ct=main mt=main> {<t=main ct=inc3 mt=main>} <t=inc3 ct=main mt=main>]\n"
-            + "]\n"
-            + "[mainM: "
-                + "<t=main ct=main mt=main> "
-                + "{<t=main ct=main mt=main> <t=inc4 ct=inc4 mt=main> <t=main ct=main mt=main>} "
-                + "<t=main ct=main mt=main>"
-            + "]\n"
-            + "<t=main ct=main mt=main>\n"
-            + "---8---\n"
-            + "mainF: <t=main ct=main mt=main>, impF: <t=main ct=imp mt=main>, incF: <t=main ct=inc mt=main>\n"
-            ;
-
-    @Test
-    public void test2321() throws IOException, TemplateException {
-        setConfiguration(createConfiguration(Configuration.VERSION_2_3_21));
-        assertOutputForNamed("main", EXPECTED_2_3_21);
-    }
-
-    @Test
-    public void test2322() throws IOException, TemplateException {
-        setConfiguration(createConfiguration(Configuration.VERSION_2_3_22));
-        assertOutputForNamed("main", EXPECTED_2_3_21.replaceAll("<t=\\w+", "<t=main"));
+                + "---6---\n"
+                + "[impM2: <t=main ct=imp mt=main>\n"
+                    + "{<t=main ct=main mt=main>}\n"
+                    + "[imp2M: <t=main ct=imp2 mt=main> {<t=main ct=imp mt=main>}]\n"
+                + "]\n"
+                + "---7---\n"
+                + "[inc3: <t=main ct=inc3 mt=main>\n"
+                    + "[mainM: <t=main ct=main mt=main> {<t=main ct=inc3 mt=main>} <t=main ct=main mt=main>]\n"
+                + "]\n"
+                + "[mainM: "
+                    + "<t=main ct=main mt=main> "
+                    + "{<t=main ct=main mt=main> <t=main ct=inc4 mt=main> <t=main ct=main mt=main>} "
+                    + "<t=main ct=main mt=main>"
+                + "]\n"
+                + "<t=main ct=main mt=main>\n"
+                + "---8---\n"
+                + "mainF: <t=main ct=main mt=main>, impF: <t=main ct=imp mt=main>, incF: <t=main ct=inc mt=main>\n"
+                .replaceAll("<t=\\w+", "<t=main"));
     }
 
     @Test
     public void testNotStarted() throws IOException, TemplateException {
-        Template t = new Template("foo", "", createConfiguration(Configuration.VERSION_2_3_21));
+        Template t = new Template("foo", "", createConfiguration(Configuration.VERSION_3_0_0));
         final Environment env = t.createProcessingEnvironment(null, null);
         assertSame(t, env.getMainTemplate());
         assertSame(t, env.getCurrentTemplate());



Mime
View raw message