Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Trunk
-
None
-
None
Description
Following lines for isSuccess():
if (ServiceUtil.isError(results) || ServiceUtil.isFailure(results)) { return false; } return true;
can be changed to
return !(ServiceUtil.isError(results) || ServiceUtil.isFailure(results));
Following lines for isFailure():
if (results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) { return false; } return ModelService.RESPOND_FAIL.equals(results.get(ModelService.RESPONSE_MESSAGE));
can be changed to
return !(results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) && ModelService.RESPOND_FAIL.equals(results.get(ModelService.RESPONSE_MESSAGE));
Following lines for isError():
if (results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) { return false; } return ModelService.RESPOND_ERROR.equals(results.get(ModelService.RESPONSE_MESSAGE));
can be changed to
return !(results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) && ModelService.RESPOND_ERROR.equals(results.get(ModelService.RESPONSE_MESSAGE));