Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030681Openbravo ERPA. Platformpublic2015-08-26 21:152015-11-23 21:17
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q1 
alostale
Core
No
0030681: Cleanup all warnings in src-core
This bug is to fix all (per openbravo preferences) eclipse warnings in src-core folder.
Check eclipse warnings with openbravo defaults eclipse preferences
No tags attached.
related to defect 0030056 closed shuehner Cleanup all eclipse warnings in src-wad 
blocks feature request 0031477 new shuehner Tracking issue to reduce the huge number of eclipse warnings in pi 
Issue History
2015-08-26 21:15shuehnerNew Issue
2015-08-26 21:15shuehnerAssigned To => platform
2015-08-26 21:15shuehnerModules => Core
2015-08-26 21:15shuehnerTriggers an Emergency Pack => No
2015-08-26 21:15shuehnerRelationship addedrelated to 0030056
2015-08-26 21:33shuehnerAssigned Toplatform => shuehner
2015-11-14 13:02shuehnerRelationship addedblocks 0031477
2015-11-16 14:00shuehnerReview Assigned To => alostale
2015-11-16 19:18hgbotCheckin
2015-11-16 19:18hgbotNote Added: 0081903
2015-11-16 19:18hgbotCheckin
2015-11-16 19:18hgbotNote Added: 0081904
2015-11-16 19:18hgbotCheckin
2015-11-16 19:18hgbotNote Added: 0081905
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/9c07a6a2385a5e4f7f1e313c3084870e74c591e7 [^]
2015-11-23 08:20alostaleNote Added: 0082051
2015-11-23 08:20alostaleStatusresolved => closed
2015-11-23 08:20alostaleFixed in Version => 3.0PR16Q1
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082243
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082244

Notes
(0081903)
hgbot   
2015-11-16 19:18   
Repository: erp/devel/pi
Changeset: e16c5403ed779bbd1d5211f3d2dd6d667f466bd9
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Nov 13 16:02:57 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e16c5403ed779bbd1d5211f3d2dd6d667f466bd9 [^]

Issue 30681: Fix all 'Name Shadowing an Conflicts' warnings in src-core
Mostly 2 classes:
- parameter name same as field name
  Solve by renaming parameter to be unique in all function
  as it takes precendence over field name unless using this.
- Local variable having same name as field name
  Solve by renaming local variable as it takes precedence over
  field name unless using this.
Exceptions:
- Slqc.java remove parameter out completely as it was never used
  in the function
- XmlTemplate: remove field uri as it was never used (so now only
  local var in some methods without shading the field)
- XmlVectorValue
  - Remove unused field xmlDocument and references writing to it
  as it was never read
  - remove function printStringBuffer(HaspMap...) completely as
    it was never used

---
M src-core/src/org/openbravo/base/ConfigParameters.java
M src-core/src/org/openbravo/base/MultipartRequest.java
M src-core/src/org/openbravo/data/Sqlc.java
M src-core/src/org/openbravo/database/ConnectionProviderImpl.java
M src-core/src/org/openbravo/uiTranslation/FieldLabelsData.java
M src-core/src/org/openbravo/xmlEngine/XmlTemplate.java
M src-core/src/org/openbravo/xmlEngine/XmlVectorValue.java
---
(0081904)
hgbot   
2015-11-16 19:18   
Repository: erp/devel/pi
Changeset: 84939351cba8705e060074302d6437595fc9a41d
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Nov 13 16:12:27 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/84939351cba8705e060074302d6437595fc9a41d [^]

Issue 30681: Fix all 'Parameter should not be assigned warnings' in src-core

Same fix always in case parameter p is written to:
Rename parameter to _p
Create temporary variable p in first line of the method, assigning it
from the _p renamed parameter.

Additionally in file BuildValidationHandler:
Chaneg access to members basedir and module to be static and not via
this. as those are static fields.

---
M src-core/src/org/openbravo/base/AntExecutor.java
M src-core/src/org/openbravo/base/HttpBaseUtils.java
M src-core/src/org/openbravo/base/VariablesBase.java
M src-core/src/org/openbravo/buildvalidation/BuildValidationHandler.java
M src-core/src/org/openbravo/data/Sqlc.java
M src-core/src/org/openbravo/data/UtilSql.java
M src-core/src/org/openbravo/database/RDBMSIndependent.java
M src-core/src/org/openbravo/utils/FormatUtilities.java
M src-core/src/org/openbravo/utils/Replace.java
---
(0081905)
hgbot   
2015-11-16 19:18   
Repository: erp/devel/pi
Changeset: 9c07a6a2385a5e4f7f1e313c3084870e74c591e7
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Nov 13 17:08:52 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9c07a6a2385a5e4f7f1e313c3084870e74c591e7 [^]

Fixed 30681. Cleanup rest of warnings in src-core

Cleanup all (but 2) warnings in src-core:

- HttpBaseServlet:
  Fix NPE. Apparently wrong operator used as testing for ""
  for a nullpointer does not make sense. But testing for not
  null and not empty does.
- JNDIConnectionProvider.PoolInfo
  Add default serialVersionUID constant
- TranslationHandler remove never read field. Add comment to (public)
  setter about its value not being used.
- TranslationUtils
  Remove local variable never being read

---
M src-core/src/org/openbravo/base/HttpBaseServlet.java
M src-core/src/org/openbravo/database/JNDIConnectionProvider.java
M src-core/src/org/openbravo/uiTranslation/TranslationHandler.java
M src-core/src/org/openbravo/uiTranslation/TranslationUtils.java
---
(0082051)
alostale   
2015-11-23 08:20   
code reviewed
(0082243)
hudsonbot   
2015-11-23 21:17   
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/7b56bebaaa88 [^]
Maturity status: Test
(0082244)
hudsonbot   
2015-11-23 21:17   
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/7b56bebaaa88 [^]
Maturity status: Test