Commit Graph
7 Commits
Author SHA1 Message Date
Pawan Verma b7ef54d494 Improved: Inconsistent String Comparisons(OFBIZ-9254)
There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.

Thanks: Devanshu for your contribution.
2020-07-30 17:02:52 +05:30
Priya SharmaandPriya Sharma dd1d408bc8 [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#24)
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762)

* [Improved]: Updated all ocurances where we only needed to pass the throwable object, without a message
- We have now added one more utility method to handle these cases. (OFBIZ-11762)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
2020-06-08 13:39:42 +02:00
Jacques Le Roux f3c3271d12 Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(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
2019-05-26 10:36:16 +00:00
Arun Patidar 8bb8f78872 Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Mridul Pathak a704171b50 Improved: Removed unused imports from groovy files in birt component.
(OFBIZ-8482)

Thanks: Ankit Joshi for contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1765042 13f79535-47bb-0310-9956-ffa450edef68
2016-10-15 12:11:11 +00:00
Deepak Dixit 8f3141cd46 (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Deepak Dixit 554cd4367c (OFBIZ-7234) Relocate .groovy files in the specialpurpose/birt component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1747782 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 19:22:06 +00:00