Skip to content

Commit 805678d

Browse files
authored
Fix GetAndChange warnings (#3702)
* Fix warnings * Update src/Neo/Persistence/DataCache.cs
1 parent 806091d commit 805678d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Neo/Persistence/DataCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public bool Contains(StorageKey key)
316316
/// <param name="key">The key of the entry.</param>
317317
/// <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>
318318
/// <returns>The cached data. Or <see langword="null"/> if it doesn't exist and the <paramref name="factory"/> is not provided.</returns>
319-
public StorageItem? GetAndChange(StorageKey key, Func<StorageItem>? factory = null)
319+
public StorageItem? GetAndChange(StorageKey key, [NotNullIfNotNull(nameof(factory))] Func<StorageItem>? factory = null)
320320
{
321321
lock (_dictionary)
322322
{

0 commit comments

Comments
 (0)