The ?
operator allows null values in Groovy (and thusly, GSP). For example, normally in gsp,
If priceDetails
is null, this will throw a NullPointerException
.
If we use the ?
operator instead ...
now the value of ${priceDetails?.amount}
is null, instead of throwing a null pointer exception.