Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030282
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersminorhave not tried2015-06-29 16:522015-11-14 13:02
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q4
StatusclosedFix in branchFixed in SCM revision0c9a6c3e2277
ProjectionnoneETAnoneTarget Version3.0PR15Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030282: Supress some warnings about 'unused object allocation' where this is intentional

DescriptionSome 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'
Steps To ReproduceCheck eclipse warnings about 'Unused object allocation'
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0031557 closedalostale NumberFilter: unneeded @SuppressWarnings("unused") annontation 
blocks feature request 0031477 newshuehner Tracking issue to reduce the huge number of eclipse warnings in pi 

-  Notes
(0078571)
hgbot (developer)
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 (manager)
2015-06-29 17:32

code reviewed

- Issue History
Date Modified Username Field Change
2015-06-29 16:52 shuehner New Issue
2015-06-29 16:52 shuehner Assigned To => Triage Finance
2015-06-29 16:52 shuehner Modules => Core
2015-06-29 16:52 shuehner Triggers an Emergency Pack => No
2015-06-29 16:56 shuehner Assigned To Triage Finance => shuehner
2015-06-29 17:29 shuehner Review Assigned To => alostale
2015-06-29 17:29 shuehner Target Version => 3.0PR15Q3
2015-06-29 17:31 hgbot Checkin
2015-06-29 17:31 hgbot Note Added: 0078571
2015-06-29 17:31 hgbot Status new => resolved
2015-06-29 17:31 hgbot Resolution open => fixed
2015-06-29 17:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0c9a6c3e2277708daf97f08d507be95cb7319d0e [^]
2015-06-29 17:32 alostale Note Added: 0078572
2015-06-29 17:32 alostale Status resolved => closed
2015-06-29 17:32 alostale Fixed in Version => 3.0PR15Q4
2015-11-14 13:02 shuehner Relationship added blocks 0031477
2015-11-23 08:33 alostale Relationship added related to 0031557


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker