Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure getOrComputeIfAbsent() does not shadow values from parent
Prior to this commit, the getOrComputeIfAbsent() methods in ExtensionContext.Store only performed a local lookup before invoking the supplied defaultCreator function. Consequently, even if a value had been stored under the supplied key in the parent Store, the getOrComputeIfAbsent() methods always created a new default value and stored it locally, thereby shadowing the desired, existing value from the parent. This commit addresses this issue by performing lookups in parents before invoking the defaultCreator function. Fixes: #349
- Loading branch information
Showing
4 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters