spullara/mustache.java — pull request #32 by mcheely (2012-06-16 03:42:02+00:00)
Title: Fix bad caching of lookup misses

When looking up a value for a tag, if there was a total miss, a MissingWrapper was returned and cached. However, the wrapper would pass all guard checks on later calls to template.execute(...), and get re-used, even if the target value was not missing. Because the only real way to check the validity of a MissingWrapper is to check all scopes for a valid hit, there doesn't seem to be much reason to ever cache it. So, I just removed it and had the methods that look up a wrapper return null on a miss.