Details
-
Improvement
-
Resolution: Won't Fix
-
Major
-
None
-
12.0-rc-1
-
None
-
Unknown
-
N/A
-
N/A
-
Description
It's not always easy with Velocity to check for null. You can use some tricks such as "#if ($variable == $NULL)" or "#if (!$variable)". However Velocity performs some conversions, calling methods such as getAsBoolean() or getAsString(). There are cases when you don't want them to be called as they can clash with your own implementation (note: this is the case for JsonObject from gson for ex).
If you need to check only for null, this directive is probably the best for that.