Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Done
-
Trunk
-
None
Description
I found that certain services in OFBiz set error/success message values in o hard-codedly like:
result.put("errorMessage", errMsg); result.put("successMessage", message);
I think it shouldn't be set like this, as we have constants in ModelService class for this purpose. ModelService.ERROR_MESSAGE/ModelService.SUCCESS_MESSAGE should be used to set the error and success messages, for in case we want to change the constant's value, no services will be affected.
result.put(ModelService.ERROR_MESSAGE, errMsg); result.put(ModelService.SUCCESS_MESSAGE, errMsg);