ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Divesh Dutta (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (OFBIZ-8471) Remove uneccessary call of isNotEmpty() to validate not null generic value
Date Thu, 27 Oct 2016 13:28:58 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-8471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Divesh Dutta reassigned OFBIZ-8471:
-----------------------------------

    Assignee: Divesh Dutta

> Remove uneccessary call of isNotEmpty() to validate not null generic value
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-8471
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-8471
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Upcoming Branch
>            Reporter: Ratnesh Upadhyay
>            Assignee: Divesh Dutta
>         Attachments: OFBIZ-8471.patch
>
>
> There are lots of places in code where we have used UtilValidate.isNotEmpty() to validate
GenericValue object. GenericValue will always be null or not null, they will never empty.
So instead of using utility method to validate them we should be using native checks onwards.
> Example:
> Currently we are validating generic value in following ways 
> {code}
> if (UtilValidate.isNotEmpty(acctgTransEntry)) {
> {code}
> instead we will using it in this way: 
> {code}
> if (acctgTransEntry != null ) { 
> {code}
> Basically these validation methods should preferably be used on Strings or Lists and
normal Maps.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message