Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #36392 Back to Issue ]
Summary 0036392: Avoid casting to Object when adding numeric results from a SimpleCallout
Revision 2017-07-04 08:51 by caristu
Description Avoid casting to Object when adding numeric values from a SimpleCallout. Before the callout refactor project (see 0032366), to set the value of a quantity it was possible to do the following:

String strHasSecondaryUOM = SLOrderProductData.hasSecondaryUOM(this, strMProductID);
info.addResult("inphasseconduom", (Object) strHasSecondaryUOM);

With the previous API, this avoided to send the value of a String surrounded by quotes. Thus, the value was finally being interpreted as a numeric value.

With the changes introduced in the mentioned project the API is more compact and it is not necessary to surround the strings between quotes to specify a string value. Therefore such castings should not be done as the type of the values is managed internally with a JSONObject.

The callouts affected by this internal change are:

- src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Product.java
- src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Product.java
- src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java
Revision 2017-07-04 08:34 by caristu
Description Avoid casting to Object when adding results from a SimpleCallout. Before the callout refactor project (see 0032366), to set the value of a quantity it was possible to do the following:

String strHasSecondaryUOM = SLOrderProductData.hasSecondaryUOM(this, strMProductID);
info.addResult("inphasseconduom", (Object) strHasSecondaryUOM);

With the previous API, this avoided to send the value of a String surrounded by quotes. Thus, the value was finally being interpreted as a numeric value.

With the changes introduced in the mentioned project the API is more compact and it is not necessary to surround the strings between quotes to specify a string value. Therefore such castings should not be done as the type of the values is managed internally with a JSONObject.

The callouts affected by this internal change are:

- src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Product.java
- src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Product.java
- src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker