freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woonsan Ko <>
Subject Re: Please test/review FreeMarker 2.3.28
Date Sat, 24 Mar 2018 02:13:06 GMT
When I tested with freemarker-2.3.28-incubating-SNAPSHOT.jar, which I
built and install it to my local maven repo from the latest "2.3"
branch myself, in my applications, I haven't found any regressions.
My applications are rather simpler probably than others as they simply
render model objects passed from request attributes through
But when I tried the new features and bug fixes [1], I think I found
somethings (perhaps there could be my misunderstandings):

1. The template example in

  <#assign optTemp = .get_optional_template('some.ftl')>
  <#if optTemp.exists>

  But if the 'some.ftl' doesn't exist, optTemp.exists fails as it's
null. So I ended up changing it to this:

  <#assign optTemp = .get_optional_template('some.ftl')>
  <#if optTemp?? && optTemp.exists>

2. Square bracket syntax through ftl directive

It reads, "This directive also determines if the template uses angle
bracket syntax (e.g. <#include 'foo.ftl'>) or square bracket syntax
(e.g. [#include 'foo.ftl']). Simply, the syntax used for this
directive will be the syntax used for the whole template, regardless
of the FreeMarker configuration settings." [2]

I applied it to an included .ftl template like this:

[#ftl output_format="HTML"]

It prints: [="Hello"] Hello,
not: Hello ${"Hello"}

3. split with an empty string

It says, "Bug fixed: When string?split(separator) is called with "" as
the argument, the string will be split to characters now. Earlier it
has thrown an IllegalArgumentException (unless the r flag was
But when I tried it, it throws an IllegalArgumentException:

<#assign a="hello"?split("l")>
java.lang.IllegalArgumentException: The separator string has 0 length
at freemarker.template.utility.StringUtil.split(

Please let me know if I miss or misinterpret somethings.




On Fri, Mar 23, 2018 at 4:08 AM, Daniel Dekany <> wrote:
> Friday, March 23, 2018, 3:33:39 AM, Woonsan Ko wrote:
>> Great to see the real release without "incubating" mark soon!
> In theory it was decided 2 days ago, but I saw nothing about the board
> meeting so far. I guess they are overburdened with the May elections
> and all that.
>> Also ! I've just read the Change log and everything is awesome!
>> I'll just try out the snapshot binary tomorrow in our applications to
>> see if there's any regression just in case.
> Great, thanks!
>> Cheers,
>> Woonsan
>> On Tue, Mar 20, 2018 at 6:39 PM, Daniel Dekany <> wrote:
>>> Before we start a VOTE on releasing 2.3.28, it would be good if more
>>> of you can test it, or otherwise review the upcoming 2.3.28! The main
>>> point in this phase is to catch technical issues.
>>> If you intend to help, but won't have time for it in the coming few
>>> days, please indicate that, so that I know that I should wait!
>>> Change log (so far, but I don't plan to add more):
>>> Binary release artifacts:
>>> Source release artifacts:
>>> The Maven artifacts are available from the Apache snaphsot repository:
>>>   <repository>
>>>     <id>apache-snapshot-repository</id>
>>>     <url></url>
>>>     <releases><enabled>false</enabled></releases>
>>>     <snapshots><enabled>true</enabled></snapshots>
>>>   </repository>
>>> under the coordinates:
>>>   <groupId>org.freemarker</groupId>
>>>   <artifactId>freemarker</artifactId>
>>>   <version>2.3.28-incubating-SNAPSHOT</version>
>>> and for the Google App Engine compatible (GAE) version:
>>>   <groupId>org.freemarker</groupId>
>>>   <artifactId>freemarker-gae</artifactId>
>>>   <version>2.3.28-incubating-SNAPSHOT</version>
>>> The ASF Board will decide tomorrow (21th) if FreeMarker can graduate.
>>> If everything goes well, this release won't have "incubating" in its
>>> version number. This will be the first such release since mid 2015
>>> (2.3.23).
>>> --
>>> Thanks,
>>>  Daniel Dekany
> --
> Thanks,
>  Daniel Dekany

View raw message