Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorrandom2015-03-26 11:552015-03-27 02:12
ReporterNaroaIriarteView Statuspublic 
Assigned ToNaroaIriarte 
PriorityurgentResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revisionb3dfa72fa77f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0029427: It is possible to modify the object of the enum class ExporType.

DescriptionIt is possible to modify the object of the singleton. It is an object which belongs to an enum, and it is shared in all the instances, so, we do not want it to be modified.
Steps To ReproduceEverywhere in the code it is possible to call the method "getExportParameters" of the "ExportType" enum, and using the method "put" of the Map for adding new values, it is modified. Executing the following code:

exportType.getExportParameters().put("ab", "ll");
Now the object it is modified. This should be avoided.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0026763 closedgorkaion Ability to launch reports from process definitions 
related to defect 0029441 closedNaroaIriarte Exporting to XLS does not work in the new ReportingUtils class 

-  Notes
hgbot (developer)
2015-03-26 15:30

Repository: erp/devel/pi
Changeset: b3dfa72fa77f6f9e857de9b37af6b7f292025b64
Author: Naroa Iriarte <naroa.iriarte <at>>
Date: Thu Mar 26 13:59:54 2015 +0100
URL: [^]

Fixed issue 29427: Modifiying the object of the enum ExportType is allowed.

The problem is that with the method getExportParemeters of the enum class ExportType, it is possible to get those
parameters in the Hasmap and after that, modify the object with the method "put".
This should not be allowed because this object belongs to an enum and all the instances have to share the same object,
we don't want to allow the modification of it.

For fixing this, an instance of the hashmap is done for making sure that if this method is called, it is only accessing
to the parameters of the current Map instance.

M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/
alostale (manager)
2015-03-26 15:32

code reviewed + tested
hudsonbot (developer)
2015-03-27 02:12

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-03-26 11:55 NaroaIriarte New Issue
2015-03-26 11:55 NaroaIriarte Assigned To => NaroaIriarte
2015-03-26 11:55 NaroaIriarte Modules => Core
2015-03-26 11:55 NaroaIriarte Triggers an Emergency Pack => No
2015-03-26 15:24 alostale Review Assigned To => alostale
2015-03-26 15:27 alostale Relationship added related to 0026763
2015-03-26 15:30 hgbot Checkin
2015-03-26 15:30 hgbot Note Added: 0076014
2015-03-26 15:30 hgbot Status new => resolved
2015-03-26 15:30 hgbot Resolution open => fixed
2015-03-26 15:30 hgbot Fixed in SCM revision => [^]
2015-03-26 15:32 alostale Note Added: 0076017
2015-03-26 15:32 alostale Status resolved => closed
2015-03-26 15:32 alostale Fixed in Version => 3.0PR15Q2
2015-03-27 02:12 hudsonbot Checkin
2015-03-27 02:12 hudsonbot Note Added: 0076044
2015-03-27 13:38 NaroaIriarte Relationship added related to 0029441

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker