Skip to content

Commit d5a8283

Browse files
committed
Fixed R# warning: the nullable suppression is redundant
1 parent 17897ca commit d5a8283

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

src/JsonApiDotNetCore/AtomicOperations/Processors/AddToRelationshipProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public AddToRelationshipProcessor(IAddToRelationshipService<TResource, TId> serv
2626
var leftId = (TId)operation.Resource.GetTypedId();
2727
ISet<IIdentifiable> rightResourceIds = operation.GetSecondaryResources();
2828

29-
await _service.AddToToManyRelationshipAsync(leftId!, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
29+
await _service.AddToToManyRelationshipAsync(leftId, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
3030

3131
return null;
3232
}

src/JsonApiDotNetCore/AtomicOperations/Processors/DeleteProcessor.cs

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

2626
var id = (TId)operation.Resource.GetTypedId();
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.
2927
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]
3128

3229
return null;
3330
}

src/JsonApiDotNetCore/AtomicOperations/Processors/RemoveFromRelationshipProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public RemoveFromRelationshipProcessor(IRemoveFromRelationshipService<TResource,
2626
var leftId = (TId)operation.Resource.GetTypedId();
2727
ISet<IIdentifiable> rightResourceIds = operation.GetSecondaryResources();
2828

29-
await _service.RemoveFromToManyRelationshipAsync(leftId!, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
29+
await _service.RemoveFromToManyRelationshipAsync(leftId, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
3030

3131
return null;
3232
}

src/JsonApiDotNetCore/AtomicOperations/Processors/SetRelationshipProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public SetRelationshipProcessor(ISetRelationshipService<TResource, TId> service)
2727
var leftId = (TId)operation.Resource.GetTypedId();
2828
object? rightValue = GetRelationshipRightValue(operation);
2929

30-
await _service.SetRelationshipAsync(leftId!, operation.Request.Relationship!.PublicName, rightValue, cancellationToken);
30+
await _service.SetRelationshipAsync(leftId, operation.Request.Relationship!.PublicName, rightValue, cancellationToken);
3131

3232
return null;
3333
}

0 commit comments

Comments
 (0)