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 theftl
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 noftl
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 justftl
). Note that as with the previous version, if a the template usesftl
directive, then the syntax of theftl
directive determines the syntax of the template, and thetagSyntax
setting is ignored. -
Now
BeansWrapper
,DefaultObjectWrapper
andSimpleObjectWrapper
support lookup with 1 character long strings inMap
-s (likemyHash["a"]
) that useCharacter
keys. Simply, as a special case, when a hash lookup fails on a string that is 1 character long, it checks for theCharacter
key in the underlying map. (Bug tracker entry [1299045] FreeMarker doesn't support map lookup with Character keys.) -
A new property,
strict
was added toBeansWrapper
,DefaultObjectWrapper
andSimpleObjectWrapper
. If this property istrue
then an attempt to read a bean propertly in the template (likemyBean.aProperty
) that doesn't exist in the bean class (as opposed to just holdingnull
value) will causeInvalidPropertyException
, which can't be suppressed in the template (not even withmyBean.noSuchProperty?default('something')
). This way?default('something')
and?exists
and similar built-ins can be used to handle existing properties whose value isnull
, 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
inprintStackTrace(...)
-
Bug fixed: [1386193] Division by zero in
ArithmeticEngine