Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0035996 | Retail Modules | StoreServer | public | 2017-05-12 09:52 | 2017-06-05 16:40 | |||||||
Reporter | AugustoMauch | |||||||||||
Assigned To | mtaal | |||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | no change required | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | RR17Q2.1 | Fixed in Version | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | mtaal | |||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0035996: getMobileServersForOrganization and getNodeIdsForOrganization methods should return copies, not original sets | |||||||||||
Description | The MobileServerProvider has two methods that return the list of mobile servers / mobile server keys that have access to a given organization, called getMobileServersForOrganization and getNodeIdsForOrganization respectively. These methods returns a set given an organization ID. The problem is that if the invokers then modify the set, then the original structure maintained in MobileServerProvider will be modified too. Those methods should return copies of the original sets, to prevent having those sets modified. | |||||||||||
Steps To Reproduce | It has been very difficult to reproduce, and only managed to do it in an environment of the BUT's development team when they were testing the Copy Store functionality. In any case, the change makes a lot of sense, and should be done even if it cannot be reproduced deterministically. | |||||||||||
Proposed Solution | Return a copy of the sets instead of the original ones. I tested the performance impact of making a copy of a set instead of returning the original one. With a set composed of 300 objects: - Copying it once took 1ms - Copying it 100 times took 2 ms - Copying it 1000 times took 12 ms. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-05-15 16:20 | mtaal | Type | defect => backport | |||||||||
2017-05-15 16:20 | mtaal | Target Version | => RR17Q2.1 | |||||||||
2017-05-15 16:21 | mtaal | Assigned To | AugustoMauch => mtaal | |||||||||
2017-06-05 16:40 | mtaal | Note Added: 0097139 | ||||||||||
2017-06-05 16:40 | mtaal | Status | scheduled => closed | |||||||||
2017-06-05 16:40 | mtaal | Resolution | open => no change required |
Notes | |||||
|
|||||
|
|