Description
Velocity has a feature that allows calling List methods on arrays.
I tried doing that on a String array.
#if ($data.viewOnlineLinkLocales.empty) Hello #end
"data" has a method:
public List<String> getViewOnlineLinkLocales() { String localeStr = getProperty(LOCALES); if (localeStr == null) { return new String[0]; } return StringUtils..split(","); }
When I try this for localeStr = null, the "empty" is returning false. On the other hand when I replace it with "isEmpty()" it correctly returns true.