I've observed a wrong behaviour in the following test case:
ST tpl = new ST("<names:{ i | <i> }>");
tpl.add("names", Arrays.asList("john", "peter"));
System.out.println(tpl.render());
The expected output would be:
john peter
But instead i get the following output:
context [anonymous] 1:7 passed 1 arg(s) to template /_sub1 with 0 declared arg(s)
1 2
As you see (apart from the warning message) we get 1 2 instead of john peter. But if we use other variable name inside the loop (u instead of i, for example, <names:{ u | <u> }>) then we get the expected output john peter.
I've observed a wrong behaviour in the following test case:
The expected output would be:
But instead i get the following output:
As you see (apart from the warning message) we get
1 2
instead ofjohn peter
. But if we use other variable name inside the loop (u
instead ofi
, for example,<names:{ u | <u> }>
) then we get the expected outputjohn peter
.