velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veit Guna <>
Subject strict mode but ignore null
Date Wed, 06 Dec 2017 22:26:28 GMT

I would like to setup Velocity so that invalid (=unknown)
properties/methods are throwing an exception, but null values shouldn't.
And that per default.
I know that I could use quiet references, but I would have to think
about everytime, whether it could be null or not. Or use it all the time,
which I would like to avoid - since I'm lazy :).

I activated strict mode which fails on unknown properties/methods -
which is good.

But it also fails on something like


What I would like is, that it doesn't fail because of
nullPropertyToObject being null.

My basic idea around this is, to spot real errors like unknown
properties during tests.
I don't really care about actual null values/references - these should
be rendered empty in case of null during runtime.

In my tests I assert, that the rendering basically works (all
properties/methods exist) and values are properly filled.
But I don't want (ever) to fail only because one property is null during

Is this somehow possible?

I just upgraded to 2.0 hoping that this is handled more flexible now.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message