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.Server.Implementations/Devices/DeviceManager.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Jellyfin.Server.Implementations/Devices') diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index bbe33be389..15ac5c668a 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -222,11 +222,7 @@ namespace Jellyfin.Server.Implementations.Devices public bool CanAccessDevice(User user, string deviceId) { ArgumentNullException.ThrowIfNull(user); - - if (string.IsNullOrEmpty(deviceId)) - { - throw new ArgumentNullException(nameof(deviceId)); - } + ArgumentException.ThrowIfNullOrEmpty(deviceId); if (user.HasPermission(PermissionKind.EnableAllDevices) || user.HasPermission(PermissionKind.IsAdministrator)) { -- cgit v1.2.3