Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033219Openbravo ERPA. Platformpublic2016-06-10 18:012016-06-20 13:11
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q3 
alostale
Core
No
0033219: Avoid unnecessary cast from String to String in SqlC generated code
When SqlC generates code to run callable statements it produces some extra casts which are not needed.

Example:
org.openbravo.erpCommon.ad_forms.AccountData
method: GetValidAccountCombination

      Vector<String> vecTotal = new Vector<String>();
      try {
        vecTotal = RDBMSIndependent.getCallableResult(conn, connectionProvider, strSql, parametersData, parametersTypes, 1);
      objectRespuestaCS.CValidCombinationId = (String) vecTotal.elementAt(0);

as vecTotal is a Vector of String that cast to String is not needed.

Searching all SqlC.java file for 'vecTotal' shows the definition to be always like that so the extra cast can be safely removed.
I.e. enable optional eclipse warnings 'unnecessary casts'.
No tags attached.
Issue History
2016-06-10 18:01shuehnerNew Issue
2016-06-10 18:01shuehnerAssigned To => shuehner
2016-06-10 18:01shuehnerModules => Core
2016-06-10 18:01shuehnerTriggers an Emergency Pack => No
2016-06-10 19:03hgbotCheckin
2016-06-10 19:03hgbotNote Added: 0087180
2016-06-10 19:03hgbotStatusnew => resolved
2016-06-10 19:03hgbotResolutionopen => fixed
2016-06-10 19:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7b9f6cdbce15830656b9e94636afd31a3dd9222a [^]
2016-06-10 19:04shuehnerReview Assigned To => alostale
2016-06-20 13:11alostaleNote Added: 0087671
2016-06-20 13:11alostaleStatusresolved => closed
2016-06-20 13:11alostaleFixed in Version => 3.0PR16Q3

Notes
(0087180)
hgbot   
2016-06-10 19:03   
Repository: erp/devel/pi
Changeset: 7b9f6cdbce15830656b9e94636afd31a3dd9222a
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Jun 10 19:02:58 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7b9f6cdbce15830656b9e94636afd31a3dd9222a [^]

Fixed 33219. Avoid unnecessary cast in SqlC generated code.

---
M src-core/src/org/openbravo/data/Sqlc.java
---
(0087671)
alostale   
2016-06-20 13:11   
code reviewed: the only modifications in generated sqlc code is the removal of these unnecessary castings.