template rendering fails if optional html message is empty string

Description

in getRenderedTemplate(), the template's optional html message is null-checked before being passed to processText(), however, if it is an empty string an illegalargumentexception will be thrown. This can happen if the xml file defining the template has an empty <htmlMessage> tag, which inserts an empty string into the database, rather than omitting the tag, which inserts a null.

Attached is a simple patch to add an empty string check before processing the html message.

Attachments

1

Activity

Show:

Hudson CI Server April 4, 2013 at 12:08 PM

Integrated in emailtemplateservice trunk #625 (See http://builds.sakaiproject.org:8080/job/emailtemplateservice%20trunk/625/)
- Contributed patch - template rendering fails of html message is empty string (Revision 122193)

Result = SUCCESS

Matthew Jones April 4, 2013 at 11:26 AM

Patch looks good, committed 122193.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created March 27, 2013 at 1:41 PM
Updated June 30, 2014 at 3:33 PM
Resolved April 4, 2013 at 11:26 AM