java.lang.String is immutable and cannot be overwritten by user.
When passing sensitive data as context variable String remains in memory until GC removes it.
CharSequence allows user to provide his own implementation and overwrite data as needed.
I'm not disabling it by default because that would change behavior for anyone
who was using reflection, which seems like annoying breakage. People who are
using JMustache with Java 9 can configure a non-coercing DefaultCollector to
eliminate the illegal access warnings.
We now have to build with JDK9 or above, but I believe that the built jar files
continue to be compatible with JDK 1.7 or above. If this turns out not to be
the case, please let me know.
First, I missed some reference checks when I stopped interning names. Fixed
those.
Second, when iterating over an array which contained null elements, the wrong
thing was happening.
Me, on the blackboard:
"I will not optimize code without using a profiler."
"I will not optimize code without using a profiler."
"I will not optimize code without using a profiler."
"I will not optimize code without using a profiler."
"I will not optimize code without using a profiler."
...
Allows a lambda to execute a template in the lambda's own context. This enables
'late bound' template inclusion where the lambda can select a template based on
dynamic data in the context at the time it is executed.
Closes#92.
This ensures that if you enter a conditional block while inside a list
block, the list "state" from the outer list will still be visible. For
example (somewhat contrived, but gets the point across):
{{#list}}
{{#name}}{{-index}}. {{.}}{{/name}}
{{^name}}{{-index}}. No name!{{/name}}
{{/list}}
Yields something like:
1. Bob
2. Mary
3. No name!
4. Jim
Fixes#90.
You can't normally reflectively access methods on Map because it has a
special fetcher, but being able to reflectively access 'entrySet' is
super useful when you want to iterate over the keys+values of a map, so
we're going to hack it in there. Ha!