Commit 76f8497d authored by Peter Harrison's avatar Peter Harrison

Handle a null object in the context.

parent 89cfcba0
......@@ -49,8 +49,11 @@ public class TemplatePlugin implements Plugin {
StringBuilder builder = new StringBuilder(resource);
for( String field : context.keySet()){
String value = context.get(field).toString();
replaceAll( field, value, builder);
Object value = context.get(field);
if( value!=null){
String valueString = value.toString();
replaceAll( field, valueString, builder);
context.put(action.getResponse(), builder.toString());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment