Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030056Openbravo ERPA. Platformpublic2015-05-31 14:302015-11-14 13:02
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q3 
alostale
Core
No
0030056: Cleanup all eclipse warnings in src-wad
This bug is to fix all (per openbravo preferences) eclipse warnings in src-wad folder.
-
No tags attached.
related to defect 0030055 closed shuehner Cleanup all eclipse warnings in src-trl 
related to defect 0030681 closed shuehner Cleanup all warnings in src-core 
blocks feature request 0031477 new shuehner Tracking issue to reduce the huge number of eclipse warnings in pi 
Issue History
2015-05-31 14:30shuehnerNew Issue
2015-05-31 14:30shuehnerAssigned To => shuehner
2015-05-31 14:30shuehnerModules => Core
2015-05-31 14:30shuehnerTriggers an Emergency Pack => No
2015-05-31 14:30shuehnerRelationship addedrelated to 0030055
2015-06-01 13:09hgbotCheckin
2015-06-01 13:09hgbotNote Added: 0077937
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/e46899b00411befee088aa43c220b51e8e7acdcb [^]
2015-06-01 13:11shuehnerReview Assigned To => alostale
2015-06-04 12:55alostaleNote Added: 0078061
2015-06-04 12:55alostaleStatusresolved => closed
2015-06-04 12:55alostaleFixed in Version => 3.0PR15Q3
2015-08-26 21:15shuehnerRelationship addedrelated to 0030681
2015-11-14 13:02shuehnerRelationship addedblocks 0031477

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

Fixed 30056: Cleanup all warnings in src-wad

XX
- Remove String or int parameter assignment by copying into local variable.
- in Wad#processSelCol use Vector.toArray function to avoid needing to
  replace reference in parameter. Note: .toArray will auto-resize itself
  to correct size as param is 0-length array
- Fix 2 possible NPE. As code to treat null as empty value was only
  called after .debug triggering NPE as param of log4j.debug will be evaluated
  even without log level set to debug.
- Wad#getVectorElementsNotRepeated function had parameter which was new empty
  Vector in all its 3 callers. As we do not expect more callers (was is
  deprecated) just remove the param completely and create new Vector inside
  the function removing param assignment.
- in WadUtility instead of assigning to text-param and immediately returning
  that value just return it directly as the rest of that function already did.
- in WadNumber. Confusion between non-static function param name + field
  inherited from superclass. As those seem to be very clearly utility
  functions which should use the param (and not some inherited field) ->
  just make them static to remove that confusion.
- WadValidator gets 'friendlyWarnings' flag on construction but does not
  currently use it. However we may want to add it (and keep api stable now)
  so just supress that unused warning.

---
M src-wad/src/org/openbravo/wad/Wad.java
M src-wad/src/org/openbravo/wad/WadUtility.java
M src-wad/src/org/openbravo/wad/controls/WADControl.java
M src-wad/src/org/openbravo/wad/controls/WADImage.java
M src-wad/src/org/openbravo/wad/controls/WADNumber.java
M src-wad/src/org/openbravo/wad/controls/WADSearch.java
M src-wad/src/org/openbravo/wad/validation/WADValidator.java
---
(0078061)
alostale   
2015-06-04 12:55   
code reviewed