Skip to content

Commit

Permalink
Remove synchronization from child storages
Browse files Browse the repository at this point in the history
Signed-off-by: DevDrizzy <[email protected]>
  • Loading branch information
DevDrizzy committed Feb 27, 2023
1 parent f5a17d2 commit a78ac09
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public abstract class ParentYamlStorage extends YamlStorage {
* Set based cache for child storages of this Parent Storage
* We keep it concurrent to allow asynchronous file I/O
*/
private Set<ChildYamlStorage> childStorages;
private List<ChildYamlStorage> childStorages;

/**
* Initiation method for a config file
Expand All @@ -38,7 +38,7 @@ public void addChildStorage(ChildYamlStorage storage) {

// Bypass for constructor being called before default variable initialization
if (childStorages == null) {
this.childStorages = Collections.synchronizedSet(new HashSet<>());
this.childStorages = new ArrayList<>();
}

this.childStorages.add(storage);
Expand Down

0 comments on commit a78ac09

Please sign in to comment.