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

Replace EntityUtilProperties getPropertyValue method with correct method calls

    Details

      Description

      In current OFBiz system at many places many methods implemented but not used as per their purpose. One example is in EntityUtilProperties we have getPropertyAsInteger() and getPropertyAsBigDecimal() and other methods which returns specific type data. But at most places system uses getPropertyValue() which returns string and then do explicit conversions.

      System should use proper methods for which they have been implemented.

        Activity

        Hide
        arunpati Arun Patidar added a comment -

        Thanks Rishi Solanki for verification.

        Show
        arunpati Arun Patidar added a comment - Thanks Rishi Solanki for verification.
        Hide
        arunpati Arun Patidar added a comment -

        Committed changes in trunk at rev: 1749882

        Thanks Rishi Solanki and Rahul Singh for your contribution.

        Show
        arunpati Arun Patidar added a comment - Committed changes in trunk at rev: 1749882 Thanks Rishi Solanki and Rahul Singh for your contribution.
        Hide
        rishisolankii Rishi Solanki added a comment - - edited

        Thanks for heads up Jacques, reviewed the work committed and nothing to worry about it as we are using different methods and no signature changed in Wai's work. Also after taking update from trunk, I've tested the work given here by Rahul Singh is working fine.

        So these changes have no impact from OFBIZ-7112. And it covers how to use OFBIZ api, so we are good. Thanks!

        Show
        rishisolankii Rishi Solanki added a comment - - edited Thanks for heads up Jacques, reviewed the work committed and nothing to worry about it as we are using different methods and no signature changed in Wai's work. Also after taking update from trunk, I've tested the work given here by Rahul Singh is working fine. So these changes have no impact from OFBIZ-7112 . And it covers how to use OFBIZ api, so we are good. Thanks!
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        OFBIZ-7112 is done

        Show
        jacques.le.roux Jacques Le Roux added a comment - OFBIZ-7112 is done
        Hide
        rishisolankii Rishi Solanki added a comment -

        I would say to be safer side we will check it just after your commit.

        Show
        rishisolankii Rishi Solanki added a comment - I would say to be safer side we will check it just after your commit.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Rishi,

        Thanks for you answer, Wai just updated OFBIZ-7112, I'll check and I guess commit very soon...

        Show
        jacques.le.roux Jacques Le Roux added a comment - Rishi, Thanks for you answer, Wai just updated OFBIZ-7112 , I'll check and I guess commit very soon...
        Hide
        rishisolankii Rishi Solanki added a comment - - edited

        Yes Jacques Le Roux we have seen your discussion on it with Wai on dev list. Here we are trying to address the practice we should follow while using the OFBiz API. Generally one method solves all purpose and users start using that method everywhere with custom conversions. I see Wai's patch on OFBIZ-7112 check for db values and override the property values. Here we have only made changes in method call, so I think we are good as changed methods call signature doesn't changed in that work. Also checked that no dependency of both improvements as we are just changing the calls.

        Thank you for your help!

        Show
        rishisolankii Rishi Solanki added a comment - - edited Yes Jacques Le Roux we have seen your discussion on it with Wai on dev list. Here we are trying to address the practice we should follow while using the OFBiz API. Generally one method solves all purpose and users start using that method everywhere with custom conversions. I see Wai's patch on OFBIZ-7112 check for db values and override the property values. Here we have only made changes in method call, so I think we are good as changed methods call signature doesn't changed in that work. Also checked that no dependency of both improvements as we are just changing the calls. Thank you for your help!
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Did you take into account the work of Wai at OFBIZ-7112?

        Show
        jacques.le.roux Jacques Le Roux added a comment - Did you take into account the work of Wai at OFBIZ-7112 ?
        Hide
        rahul.kushwah Rahul Singh added a comment -

        Here is the patch to use methods as per their purpose at various places in the system. Thanks to Arun Patidar and Rishi Solanki for discussion and review.

        Show
        rahul.kushwah Rahul Singh added a comment - Here is the patch to use methods as per their purpose at various places in the system. Thanks to Arun Patidar and Rishi Solanki for discussion and review.

          People

          • Assignee:
            arunpati Arun Patidar
            Reporter:
            rishisolankii Rishi Solanki
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development