Skip to content

Commit bc2865d

Browse files
committed
Fix broken build on .NET SDK v10.0.200
1 parent 21cc6e2 commit bc2865d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/JsonApiDotNetCore/AtomicOperations/Processors/DeleteProcessor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public DeleteProcessor(IDeleteService<TResource, TId> service)
2424
ArgumentNullException.ThrowIfNull(operation);
2525

2626
var id = (TId)operation.Resource.GetTypedId();
27-
await _service.DeleteAsync(id!, cancellationToken);
27+
#pragma warning disable CS8607 // A possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
28+
// Justification: Temporary workaround for R# bug at https://youtrack.jetbrains.com/issue/RSRP-503026.
29+
await _service.DeleteAsync(id, cancellationToken);
30+
#pragma warning restore CS8607 // A possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
2831

2932
return null;
3033
}

src/JsonApiDotNetCore/Diagnostics/CodeTimingSessionManager.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ private static void AssertNoActiveSession()
8989

9090
private static void SessionOnDisposed(object? sender, EventArgs args)
9191
{
92-
if (_session != null)
93-
{
94-
_session.Disposed -= SessionOnDisposed;
95-
_session = null;
96-
}
92+
_session?.Disposed -= SessionOnDisposed;
93+
_session = null;
9794
}
9895
}

0 commit comments

Comments
 (0)