(OFBIZ-11064)
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[1].
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{ // Not set, use a default maxRetry = -1 }
Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero. So it's best not to use groovy truth for null-checks on
numbers in some cases.
Thanks: Pawan Verma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
ProjectMgr component
This OFBiz component enables organisations to manage projects, project phases and project tasks.
more information
For more information about this component visit the product page in the OFBiz WIKI, which can be found at https://cwiki.apache.org/confluence/display/OFBIZ/Project+Management
issues
JIRA issues related to this component can be found at https://issues.apache.org/jira/browse/OFBIZ/component/12312073
commits
Committed revisions can be viewed at http://svn.apache.org/viewvc/ofbiz/trunk/plugins/projectmgr/