Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030052Openbravo ERPA. Platformpublic2015-05-30 19:532015-11-14 13:02
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q3 
alostale
Core
No
0030052: Lots of 'Unnecessary cast' warnings in pi after enabling that extra warning in Eclipse
The Eclipse IDE can show optional warnings. One of those is 'Unnecessary casts'.

Which shows redundant code doing

i.e.
String test;
String test = (String) test;

or many similar cases.

As that code is not useful and makes it harder to read+understand it should be fixed.
Eclipse
Project or global setting
Java -> Compile -> Errors/Warnings
- in section Unnecessary Code
Enable:
- Unnecessary Cast or instanceof operation

Remove the unnecessary code.
No tags attached.
related to defect 0030055 closed shuehner Cleanup all eclipse warnings in src-trl 
blocks feature request 0031477 new shuehner Tracking issue to reduce the huge number of eclipse warnings in pi 
Issue History
2015-05-30 19:53shuehnerNew Issue
2015-05-30 19:53shuehnerAssigned To => platform
2015-05-30 19:53shuehnerModules => Core
2015-05-30 19:53shuehnerTriggers an Emergency Pack => No
2015-05-30 21:35shuehnerAssigned Toplatform => shuehner
2015-06-01 13:08hgbotCheckin
2015-06-01 13:08hgbotNote Added: 0077931
2015-06-01 13:08hgbotStatusnew => resolved
2015-06-01 13:08hgbotResolutionopen => fixed
2015-06-01 13:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/56776f691f4baa93d7d453d54b2d6c94393e0da0 [^]
2015-06-01 13:10shuehnerReview Assigned To => alostale
2015-06-04 12:18alostaleRelationship addedrelated to 0030088
2015-06-04 12:24alostaleRelationship addedrelated to 0030055
2015-06-04 12:28alostaleNote Added: 0078058
2015-06-04 12:28alostaleStatusresolved => closed
2015-06-04 12:28alostaleFixed in Version => 3.0PR15Q3
2015-11-14 13:02shuehnerRelationship addedblocks 0031477
2015-11-14 13:04shuehnerRelationship deletedrelated to 0030088

Notes
(0077931)
hgbot   
2015-06-01 13:08   
Repository: erp/devel/pi
Changeset: 56776f691f4baa93d7d453d54b2d6c94393e0da0
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Sat May 30 19:57:13 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/56776f691f4baa93d7d453d54b2d6c94393e0da0 [^]

Fixed 30052. Cleanup all 'Unnecessary cast' warnings from Eclipse.

As those extra casts are not useful and make the code harder to read/understand
-> Remove all those

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentProposalPickEditLines.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpressionHandler.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/MultipleDeleteActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/OBBindings.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TreeTablesEventHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ImagesActionHandler.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponent.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/LinkToParentTreeDatasourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/NoteDataSource.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java
M src-core/src/org/openbravo/base/VariablesBase.java
M src-test/src/org/openbravo/test/dal/ADCachedMultiThreadTest.java
M src-test/src/org/openbravo/test/xml/EntityXMLIssues.java
M src/org/openbravo/base/model/Column.java
M src/org/openbravo/base/model/ModelProvider.java
M src/org/openbravo/base/session/OBYesNoType.java
M src/org/openbravo/base/structure/IdentifierProvider.java
M src/org/openbravo/common/actionhandler/KillProcess.java
M src/org/openbravo/common/datasource/ResultMapCriteriaUtils.java
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
M src/org/openbravo/costing/CostingAlgorithm.java
M src/org/openbravo/costing/CostingMigrationProcess.java
M src/org/openbravo/costing/CostingRuleProcess.java
M src/org/openbravo/costing/CostingRuleProcessOnProcessHandler.java
M src/org/openbravo/costing/InventoryAmountUpdateProcess.java
M src/org/openbravo/costing/LCMatchingProcess.java
M src/org/openbravo/costing/LandedCostDistributionByAmount.java
M src/org/openbravo/costing/LandedCostProcess.java
M src/org/openbravo/dal/security/SecurityChecker.java
M src/org/openbravo/dal/service/OBDao.java
M src/org/openbravo/dal/xml/EntityExcelXMLConverter.java
M src/org/openbravo/dal/xml/EntityXMLConverter.java
M src/org/openbravo/erpCommon/ad_actionButton/ExportReferenceData.java
M src/org/openbravo/erpCommon/ad_callouts/SL_SequenceProduct_Product_Attribute.java
M src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
M src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData.java
M src/org/openbravo/erpCommon/ad_process/MRPPurchaseCreateReservations.java
M src/org/openbravo/erpCommon/ad_process/RegisterModule.java
M src/org/openbravo/erpCommon/businessUtility/InitialClientSetup.java
M src/org/openbravo/erpCommon/info/ImageInfoBLOB.java
M src/org/openbravo/erpCommon/modules/ImportModule.java
M src/org/openbravo/erpCommon/modules/VersionUtility.java
M src/org/openbravo/erpCommon/utility/GenericTree.java
M src/org/openbravo/erpCommon/utility/Utility.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
M src/org/openbravo/erpReports/ReportVatRegisterJR.java
M src/org/openbravo/materialmgmt/InventoryCountProcess.java
M src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java
M src/org/openbravo/materialmgmt/VariantChDescUpdateProcess.java
M src/org/openbravo/service/db/CallProcess.java
M src/org/openbravo/service/db/DataImportService.java
M src/org/openbravo/service/importprocess/ImportProcessUtils.java
---
(0078058)
alostale   
2015-06-04 12:28   
code reviewed and discused with SHU