From b366dc2e6e5be2b93f2b6fcc4549a32b655c3806 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 13 Oct 2022 19:08:00 +0200 Subject: Use ArgumentException.ThrowIfNullOrEmpty --- Jellyfin.Api/Controllers/SessionController.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Jellyfin.Api/Controllers/SessionController.cs') diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 9218c3b5c..085ac808b 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -294,10 +294,7 @@ namespace Jellyfin.Api.Controllers { var currentSession = await RequestHelpers.GetSession(_sessionManager, _userManager, HttpContext).ConfigureAwait(false); - if (command is null) - { - throw new ArgumentException("Request body may not be null"); - } + ArgumentNullException.ThrowIfNull(command, "Request body may not be null"); command.ControllingUserId = currentSession.UserId; -- cgit v1.2.3