Skip to content

Commit 8b4cef7

Browse files
committed
Use ThrowIfNull in RawRequestBodyFormatter CanRead method
1 parent c459bd9 commit 8b4cef7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Common.AspNetCore/RawRequestBodyFormatter.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ public RawRequestBodyFormatter()
2626

2727
public override bool CanRead(InputFormatterContext context)
2828
{
29-
if (context == null)
30-
{
31-
throw new ArgumentNullException(nameof(context));
32-
}
29+
ArgumentNullException.ThrowIfNull(context);
3330

3431
var contentType = context.HttpContext.Request.ContentType;
3532
return string.IsNullOrEmpty(contentType)

0 commit comments

Comments
 (0)