Hello Devs,

As we all know, Groovy is a powerful language with great built-in
functions. Groovy Truth[1] is one of them, which is not used properly in
our code base. We have used UtilValidate Class to validate arguments for
Empty or NotEmpty, which can easily be done in groovy with built-in
functionality.

Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }

Groovy Built-in Code: if (locations) { ... }

IMO, We should use this Groovy Truth feature instead of UtilValidate Class.
Please let me know your thoughts on this. Thanks!
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth

--
Kind Regards
Pawan Verma
Technical Consultant
*HotWax Systems*

Reply via email to