Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030282Openbravo ERPZ. Otherspublic2015-06-29 16:522015-11-14 13:02
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q33.0PR15Q4 
alostale
Core
No
0030282: Supress some warnings about 'unused object allocation' where this is intentional
Some code does create some objects which are not directly used however does that intentionally because of side-effects.

try {
  new BigDecimal("bad value");
} catch {
  // notice it failed
}

Mark those cases with SupressWarnings they should not trigger a warning about the useless 'new'
Check eclipse warnings about 'Unused object allocation'
No tags attached.
related to defect 0031557 closed alostale NumberFilter: unneeded @SuppressWarnings("unused") annontation 
blocks feature request 0031477 new shuehner Tracking issue to reduce the huge number of eclipse warnings in pi 
Issue History
2015-06-29 16:52shuehnerNew Issue
2015-06-29 16:52shuehnerAssigned To => Triage Finance
2015-06-29 16:52shuehnerModules => Core
2015-06-29 16:52shuehnerTriggers an Emergency Pack => No
2015-06-29 16:56shuehnerAssigned ToTriage Finance => shuehner
2015-06-29 17:29shuehnerReview Assigned To => alostale
2015-06-29 17:29shuehnerTarget Version => 3.0PR15Q3
2015-06-29 17:31hgbotCheckin
2015-06-29 17:31hgbotNote Added: 0078571
2015-06-29 17:31hgbotStatusnew => resolved
2015-06-29 17:31hgbotResolutionopen => fixed
2015-06-29 17:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0c9a6c3e2277708daf97f08d507be95cb7319d0e [^]
2015-06-29 17:32alostaleNote Added: 0078572
2015-06-29 17:32alostaleStatusresolved => closed
2015-06-29 17:32alostaleFixed in Version => 3.0PR15Q4
2015-11-14 13:02shuehnerRelationship addedblocks 0031477
2015-11-23 08:33alostaleRelationship addedrelated to 0031557

Notes
(0078571)
hgbot   
2015-06-29 17:31   
Repository: erp/devel/pi
Changeset: 0c9a6c3e2277708daf97f08d507be95cb7319d0e
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Jun 29 17:28:49 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0c9a6c3e2277708daf97f08d507be95cb7319d0e [^]

Fixed 30282: Suppress 'unused object allocation' warnings where done intentionally.

In some cases existing code does create objects without using them just to check for
side-effects. I.e. new BigDecimal(someString) to check if that string can be parsed
as a number.
Supress the warning in those cases.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/freemarker/FreemarkerTemplateProcessor.java
M src-core/src/org/openbravo/base/filter/NumberFilter.java
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0078572)
alostale   
2015-06-29 17:32   
code reviewed