Dear Expert,
We have reports in java, use report templates. It used maps to load data, and put the data in report template with the code:
public static String getData(String templateName, Map<String, ? extends Object> data){
StringTemplateGroup group = new StringTemplateGroup("jmaris");
StringTemplate query = group.getInstanceOf("templates/"+templateName);
query.setAttributes(data);
return query.toString();
}
the lib file was stringtemplate-3.2.1.jar, antlr-2.7.6.jar or older version.
Now we need to upgrade it, we downloaded stringtemplate-4.0.jar, but the code above does not work with the new jar.
Change the code to:
public static String getData(String templateName, Map<String, ? extends Object> data){
STGroup group = new STGroup();
ST query = group.getInstanceOf("templates/"+templateName);
query.setAttributes(data);
return query.toString();
}
query.setAttributes(data) throw error: setAttributes with map parameter does not exist. But cannot find a replacement.

Could you please help?
Thank you in advance.
Eric