2.14pre1 null values as default parameter of macro

Florian Falkner <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hello!

We're are running an application with an ancient prerelease of freemarker 2.4 (namely freemarker2.4.0_090807svn.jar). So far it really works well.

Today I tried to upgrade the application to freemarker-2.4pre1.jar and now the following construct doesn't work anymore:

[#macro mainLayout layout=null]
	<!--html here -->
	[#if layout??]	 
		${layout}
	[/#if]
	<!--html also here-->
[/#macro]

Exception is:

freemarker.core.InvalidReferenceException: Expression null is undefined on line 71, column 27 in ilbi/admin/admin.ftl.
	at freemarker.core.helpers.DefaultReferenceChecker.assertNonNull(DefaultReferenceChecker.java:18)

Is this the desired behaviour for 2.4? If so I'll update my parameter specifications.

thanks,
Florian

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.