Skip to content

Commit

Permalink
Fix GetAndChange warnings (#3702)
Browse files Browse the repository at this point in the history
* Fix warnings

* Update src/Neo/Persistence/DataCache.cs
  • Loading branch information
shargon authored Jan 30, 2025
1 parent 806091d commit 805678d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Neo/Persistence/DataCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public bool Contains(StorageKey key)
/// <param name="key">The key of the entry.</param>
/// <param name="factory">A delegate used to create the entry if it doesn't exist. If the entry already exists, the factory will not be used.</param>
/// <returns>The cached data. Or <see langword="null"/> if it doesn't exist and the <paramref name="factory"/> is not provided.</returns>
public StorageItem? GetAndChange(StorageKey key, Func<StorageItem>? factory = null)
public StorageItem? GetAndChange(StorageKey key, [NotNullIfNotNull(nameof(factory))] Func<StorageItem>? factory = null)
{
lock (_dictionary)
{
Expand Down

0 comments on commit 805678d

Please sign in to comment.