Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1
-
None
-
None
Description
script used :
Map<String, Object> variables = new HashMap<>();
variables.put("key1", "value");
Context context = velocityEngine.getToolsContext(variables);
String inString = "#set($value = \"key value false\")" +
"#if(${key1} == 1 ||\"yes\" )" +
" #set($value = \"{}key value true{}\")" +
"#end\n${value}";
inString = velocityEngine.evaluate(context, "tag", inString);
System.out.println(inString);
Output:
older version output : key value true
newer version output : key value false