Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031480Openbravo ERPZ. Otherspublic2015-11-14 13:242015-11-23 08:27
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q1 
alostale
Core
No
0031480: Remove all unnecessary casts in code (except Sqlc generated code)
Cleanup extra casts in the code which are not needed and clutter the code when trying to read it.

i.e. optional Eclipse warning 'Unnecessary cast from XX to YY'
No tags attached.
blocks feature request 0031477 new shuehner Tracking issue to reduce the huge number of eclipse warnings in pi 
Issue History
2015-11-14 13:24shuehnerNew Issue
2015-11-14 13:24shuehnerAssigned To => Triage Finance
2015-11-14 13:24shuehnerModules => Core
2015-11-14 13:24shuehnerTriggers an Emergency Pack => No
2015-11-14 13:24shuehnerRelationship addedblocks 0031477
2015-11-14 13:24shuehnerAssigned ToTriage Finance => shuehner
2015-11-16 14:01shuehnerReview Assigned To => alostale
2015-11-16 19:18hgbotCheckin
2015-11-16 19:18hgbotNote Added: 0081908
2015-11-16 19:18hgbotStatusnew => resolved
2015-11-16 19:18hgbotResolutionopen => fixed
2015-11-16 19:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3a7faced04fe6a5caecbe102264df41fb0189a3d [^]
2015-11-23 08:27alostaleNote Added: 0082053
2015-11-23 08:27alostaleStatusresolved => closed
2015-11-23 08:27alostaleFixed in Version => 3.0PR16Q1

Notes
(0081908)
hgbot   
2015-11-16 19:18   
Repository: erp/devel/pi
Changeset: 3a7faced04fe6a5caecbe102264df41fb0189a3d
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Sat Nov 14 13:26:10 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3a7faced04fe6a5caecbe102264df41fb0189a3d [^]

Fixed 31480: Remove unnecessary casts in code

A few distinct patterns:
- Cast from XX directly to XX just not needed at all
  - sometimes from .uniqueResult()
  - somtimes from i.e. reading from typed Map
- Cast from Object to XX then passing to API using object anyway
  i.e. result of .uniqueResult() then passing to Restrictions.eq
- some misc ones like DalUtil.getId to String when not required

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
M src-test/src/org/openbravo/test/role/inheritance/RoleInheritanceTestUtils.java
M src/org/openbravo/costing/CostingMigrationProcess.java
M src/org/openbravo/event/GLJournalLineEventHandler.java
M src/org/openbravo/role/inheritance/InheritedAccessEnabledEventHandler.java
M src/org/openbravo/role/inheritance/RecalculatePermissionsHandler.java
M src/org/openbravo/role/inheritance/RoleInheritanceEventHandler.java
M src/org/openbravo/role/inheritance/RoleInheritanceManager.java
M src/org/openbravo/role/inheritance/access/AccessTypeInjector.java
M src/org/openbravo/role/inheritance/access/FieldAccessInjector.java
M src/org/openbravo/role/inheritance/access/TabAccessInjector.java
---
(0082053)
alostale   
2015-11-23 08:27   
code reviewed