Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030054Openbravo ERPA. Platformpublic2015-05-30 21:452015-11-14 13:02
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q3 
alostale
Core
No
0030054: Cleanup warnings in wad generated code (srcAD)
Any warnings in wad-generated code are per se not really interesting and that code is in do not touch mode.

However there are a few which can be very easily fixed and help to reduce the huge amount of open warnings in eclipse.
Check amount of eclipse warnings filtering for srcAD folder
Check each type for simple fix.
simple in:
- easy + fast to fix
- easy + fast to review
- obviously safe/correct
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 21:45shuehnerNew Issue
2015-05-30 21:45shuehnerAssigned To => shuehner
2015-05-30 21:45shuehnerModules => Core
2015-05-30 21:45shuehnerTriggers an Emergency Pack => No
2015-06-01 13:09hgbotCheckin
2015-06-01 13:09hgbotNote Added: 0077935
2015-06-01 13:09hgbotStatusnew => resolved
2015-06-01 13:09hgbotResolutionopen => fixed
2015-06-01 13:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ada6ae238e948125c092eb34c046f385d978c01b [^]
2015-06-01 13:11shuehnerReview Assigned To => alostale
2015-06-04 12:24alostaleRelationship addedrelated to 0030055
2015-06-04 12:53alostaleNote Added: 0078059
2015-06-04 12:53alostaleStatusresolved => closed
2015-06-04 12:53alostaleFixed in Version => 3.0PR15Q3
2015-11-14 13:02shuehnerRelationship addedblocks 0031477

Notes
(0077935)
hgbot   
2015-06-01 13:09   
Repository: erp/devel/pi
Changeset: ada6ae238e948125c092eb34c046f385d978c01b
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Sun May 31 13:33:21 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ada6ae238e948125c092eb34c046f385d978c01b [^]

Fixed 30054: Cleanup warnings in wad-generated code

Goal is not to make wad-generated code nicer (as it should go away).
But instead to reduce the big number of eclipse warnings in it.
So they get out of the way when looking at warning in other code

Changes:
- remove java.util.Arrays & java.util.List imports and covered by existing
  java.util.* import
- The other 'unused' code warnings are not so easy to fix so in context of wad
  supress all 'unused' warnings in the srcAD files on class level.
  As secondary change remove to existing more specific unused annotation
  as they triggered warnings themselves (and are covered by the new one anyway)
- Remove private log4j Logger declaration. It shadows a similar one coming
  inherited from HttpBaseServer. That one is defined as non-static via
  this.getClass so is already of the instance we want (the concrete window-
  servlet). That means logger functionally works as before (you can still
  set i.e. debug level logging for individual servlet as before).
- in printPageEdit function a parameter was being assigned to in the function
  quite often. Apparently those cannot be surpressed. After checking easy to fix
  - All caller use just simple constant on every call.
  - So add local variable on top of function and copy param value.
  - Keep existing param name as variable name to reduce diff of generated code.

Together those reduce number of warnings in srcAD from hundreds down to just 14.

---
M src-wad/src/org/openbravo/wad/javasource.javaxml
---
(0078059)
alostale   
2015-06-04 12:53   
code reviewed

checked wad output before vs after change