Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9303

Remove hard-coded success/error message variables set in service output

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • Trunk
    • 17.12.01
    • ALL COMPONENTS
    • 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);
      

      Attachments

        1. OFBIZ-9303.patch
          17 kB
          Devanshu Vyas

        Activity

          People

            deepak Deepak Dixit
            devanshu Devanshu Vyas
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: