Date of release: 2006-03-11

This release was withdrawn because of a serious bug in it. Please don't use it! Of course, all new features of it are included in FreeMarker 2.3.6.

A few new features and several bugfixes.

Changes on the FTL side

  • Bug fixed: [1435847] Alternative syntax doesn't work for comments

  • Bug fixed: With the new square bracket syntax, the tag could be closed with >. Now it can be closed with ] only.

  • Bug fixed: [1324020] ParseException with the ftl directive if it wasn't in its own line

  • Bug fixed: [1404033] eval built-in fails with hash concatenation

Changes on the Java side

  • A new Configuration level setting, tagSyntax was added. This determines the syntax of the templates (angle bracket syntax VS square bracket syntax) that has no ftl directive in it. So now you can choose to use the new square bracket syntax by default. However, the recommended is to use auto-detection (yourConfig.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX)), because that will be the default starting from 2.4. Auto-detection chooses syntax based on the syntax of the first FreeMarker tag of the template (could be any FreeMarker tag, not just ftl). Note that as with the previous version, if a the template uses ftl directive, then the syntax of the ftl directive determines the syntax of the template, and the tagSyntax setting is ignored.

  • Now BeansWrapper, DefaultObjectWrapper and SimpleObjectWrapper support lookup with 1 character long strings in Map-s (like myHash["a"]) that use Character keys. Simply, as a special case, when a hash lookup fails on a string that is 1 character long, it checks for the Character key in the underlying map. (Bug tracker entry [1299045] FreeMarker doesn't support map lookup with Character keys.)

  • A new property, strict was added to BeansWrapper, DefaultObjectWrapper and SimpleObjectWrapper. If this property is true then an attempt to read a bean propertly in the template (like myBean.aProperty) that doesn't exist in the bean class (as opposed to just holding null value) will cause InvalidPropertyException, which can't be suppressed in the template (not even with myBean.noSuchProperty?default('something')). This way ?default('something') and ?exists and similar built-ins can be used to handle existing properties whose value is null, without the risk of hiding typos in the property names. Typos will always cause error. But mind you, it goes against the basic approach of FreeMarker, so use this feature only if you really know what are you doing.

  • Bug fixed: [1426227] NullPointerException in printStackTrace(...)

  • Bug fixed: [1386193] Division by zero in ArithmeticEngine