Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0029427 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | random | 2015-03-26 11:55 | 2015-03-27 02:12 | |||
Reporter | NaroaIriarte | View Status | public | |||||
Assigned To | NaroaIriarte | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR15Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | b3dfa72fa77f | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0029427: It is possible to modify the object of the enum class ExporType. | |||||||
Description | It 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 Reproduce | Everywhere 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. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0076014) hgbot (developer) 2015-03-26 15:30 |
Repository: erp/devel/pi Changeset: b3dfa72fa77f6f9e857de9b37af6b7f292025b64 Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com> Date: Thu Mar 26 13:59:54 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/b3dfa72fa77f6f9e857de9b37af6b7f292025b64 [^] 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/ReportingUtils.java --- |
(0076017) alostale (manager) 2015-03-26 15:32 |
code reviewed + tested |
(0076044) 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: https://code.openbravo.com/erp/devel/main/rev/b8858c8b542b [^] 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 | => http://code.openbravo.com/erp/devel/pi/rev/b3dfa72fa77f6f9e857de9b37af6b7f292025b64 [^] |
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 |