You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Deepak Dixit (JIRA)" <ji...@apache.org> on 2017/05/16 17:05:04 UTC
[jira] [Closed] (OFBIZ-9303) Remove hard-coded success/error
message variables set in service output
[ https://issues.apache.org/jira/browse/OFBIZ-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepak Dixit closed OFBIZ-9303.
-------------------------------
Resolution: Done
> Remove hard-coded success/error message variables set in service output
> ------------------------------------------------------------------------
>
> Key: OFBIZ-9303
> URL: https://issues.apache.org/jira/browse/OFBIZ-9303
> Project: OFBiz
> Issue Type: Improvement
> Components: ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Devanshu Vyas
> Assignee: Deepak Dixit
> Priority: Minor
> Attachments: OFBIZ-9303.patch
>
>
> I found that certain services in OFBiz set error/success message values in o hard-codedly like:
> {code}
> result.put("errorMessage", errMsg);
> result.put("successMessage", message);
> {code}
> 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.
> {code}
> result.put(ModelService.ERROR_MESSAGE, errMsg);
> result.put(ModelService.SUCCESS_MESSAGE, errMsg);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)