Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035470 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Retail Modules] StoreServer | minor | have not tried | 2017-03-09 16:48 | 2017-03-18 11:49 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 7416d6418ced | ||||
Projection | none | ETA | none | Target Version | RR17Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | mtaal | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035470: Code should not adapt the Map instance it gets from a method, but instead call the originating class to adapt the Map | |||||||
Description | See the code here [1], it gets a Map instance from the SynchronizationEngineProvider.getChannelsWithInitialLoadInProgress() method and changes the Map instance. This works as the Map instance is the same as being kept internally in the SynchronizationEngineProvider. But it is less nice from a encapsulation point of view to adapt the map outside of its owner (the SynchronizationEngineProvider). [1] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/5f4547f93c1a9a8ba8add123b198ec084e8ff95e#l4.42 [^] | |||||||
Steps To Reproduce | See description | |||||||
Proposed Solution | Better to either call the setter again (makes no difference in the logic really but shows that the resulting map is set back, ignoring multi-threading issues). But nicest probably to have a removeChannel method on the SynchronizationEngineProvider to remove a channel from the internal Map. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0094894) hgbot (developer) 2017-03-10 09:14 |
Repository: erp/pmods/org.openbravo.replication.symmetricds Changeset: 7416d6418ced0a003624169ee3c0f7e12f7a14e0 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Fri Mar 10 09:14:09 2017 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/7416d6418ced0a003624169ee3c0f7e12f7a14e0 [^] Fixes issue 35470: Improves encapsulation in server Initial Data Load process The SynchronizationEngineProvider class keeps a Map to manage the channels whose initial data load is not finished. Before this changeset, this Map was shared with other classes, that r ead it and modified. Now the map is not shared, and some methods to modify the map have been added to SynchronizationEngineProvider to improve the encapsulation. --- M src/org/openbravo/replication/symmetricds/SynchronizationEngineProvider.java M src/org/openbravo/replication/symmetricds/extensions/BatchDatabaseWriterControl.java --- |
(0095383) mtaal (manager) 2017-03-18 11:49 |
Reviewed and tested |
Issue History | |||
Date Modified | Username | Field | Change |
2017-03-09 16:48 | mtaal | New Issue | |
2017-03-09 16:48 | mtaal | Assigned To | => AugustoMauch |
2017-03-09 16:48 | mtaal | Triggers an Emergency Pack | => No |
2017-03-09 16:49 | mtaal | Relationship added | blocks 0034835 |
2017-03-10 09:14 | hgbot | Checkin | |
2017-03-10 09:14 | hgbot | Note Added: 0094894 | |
2017-03-10 09:14 | hgbot | Status | new => resolved |
2017-03-10 09:14 | hgbot | Resolution | open => fixed |
2017-03-10 09:14 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/7416d6418ced0a003624169ee3c0f7e12f7a14e0 [^] |
2017-03-18 11:48 | mtaal | Review Assigned To | => mtaal |
2017-03-18 11:48 | mtaal | Proposed Solution updated | |
2017-03-18 11:49 | mtaal | Note Added: 0095383 | |
2017-03-18 11:49 | mtaal | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |