Improved: Inconsistent String Comparisons, Applied plugins groovy patch from jira issue. (OFBIZ-9254)

I found an inconsistency 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 Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1795344 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Deepak Dixit
2017-05-16 17:36:32 +00:00
parent 91fb6d5f4d
commit 18894e6dc0
16 changed files with 62 additions and 62 deletions
@@ -46,7 +46,7 @@ userLoginId = userLogin.partyId
} else {
custRequestTypeId = projectAndTaskMap.custRequestTypeId
backlogStatusId = projectAndTaskMap.backlogStatusId
if (custRequestTypeId.equals("RF_SCRUM_MEETINGS") && backlogStatusId.equals("CRQ_REVIEWED")) {
if ("RF_SCRUM_MEETINGS".equals(custRequestTypeId) && "CRQ_REVIEWED".equals(backlogStatusId)) {
projectSprintBacklogAndTaskList.add(projectAndTaskMap)
}
}