Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036436Openbravo ERP09. Financial managementpublic2017-07-06 13:352017-09-21 16:49
shuehner 
Triage Finance 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q4 
vmromanos
Core
No
0036436: Avoid using Vector<Object> when only single type of data is used in the list (functional part)
Vector<Object> or any other of Object only make sense when planning to save several types of data inside the list.

When only stores i.e. Strings or objects of some other single class it does not make sense to use Vector<Object>:
- as no benefit
- harder to read + debug
- need extra casts when retrieving data

So this issue is about fixing simple cases which break this.

Note: Cases are selected as:
a.) simply fixable
b.) causing issues in latest release of some external code-checking tool (checkerframework)
-
No tags attached.
related to defect 0036437 closed shuehner Avoid using Vector<Object> when only single type of data is used in the list (platform part) 
diff vector-object-functional.diff (20,344) 2017-07-06 13:39
https://issues.openbravo.com/file_download.php?file_id=10896&type=bug
Issue History
2017-07-06 13:35shuehnerNew Issue
2017-07-06 13:35shuehnerAssigned To => Triage Finance
2017-07-06 13:35shuehnerModules => Core
2017-07-06 13:35shuehnerTriggers an Emergency Pack => No
2017-07-06 13:39shuehnerFile Added: vector-object-functional.diff
2017-07-06 13:39shuehnerNote Added: 0097910
2017-07-06 13:44shuehnerRelationship addedrelated to 0036437
2017-07-07 10:38vmromanosStatusnew => scheduled
2017-07-07 14:03hgbotCheckin
2017-07-07 14:03hgbotNote Added: 0097954
2017-07-07 14:03hgbotStatusscheduled => resolved
2017-07-07 14:03hgbotResolutionopen => fixed
2017-07-07 14:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b4290824ae054a573ce184ec5afc6f71871f609f [^]
2017-07-07 14:03vmromanosReview Assigned To => vmromanos
2017-07-07 14:03vmromanosNote Added: 0097956
2017-07-07 14:03vmromanosStatusresolved => closed
2017-07-07 14:03vmromanosFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099250

Notes
(0097910)
shuehner   
2017-07-06 13:39   
Note: Patch is only compile tested locally.

While all changes are very simple please verify.

Note: I used diamond operator (available since java7) when changing types to simplify code.
(0097954)
hgbot   
2017-07-07 14:03   
Repository: erp/devel/pi
Changeset: b4290824ae054a573ce184ec5afc6f71871f609f
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Jul 07 10:43:24 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b4290824ae054a573ce184ec5afc6f71871f609f [^]

Fixed issue 36436: Avoid using Vector<Object> for single type of data

Changeset pushed on Stefan's behalf

---
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java
M src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java
M src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java
M src/org/openbravo/erpCommon/businessUtility/AccountTree.java
M src/org/openbravo/erpCommon/businessUtility/COAUtility.java
---
(0097956)
vmromanos   
2017-07-07 14:03   
Code review OK
(0099250)
hudsonbot   
2017-09-21 16:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test