HubSpot / jinjava

Jinja template engine for Java
Apache License 2.0
700 stars 169 forks source link

Fix NPE for loop tuple vars of null. #1164

Closed hs-lsong closed 7 months ago

hs-lsong commented 7 months ago

If the a loop value is null, we should not try to get the .getClass() of it. It throws a NPE. We fixed this for single var loops, did not expect this also happens for tuples.

A bad jinjava tag can trigger it:

{% for  for row in module.specific_projects  %}