diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-10-13 19:08:00 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-07 16:43:59 +0100 |
| commit | b366dc2e6e5be2b93f2b6fcc4549a32b655c3806 (patch) | |
| tree | 8f7ee8407e31e58db9aabe74bfc21936275ec45e /Jellyfin.Server.Implementations/Devices/DeviceManager.cs | |
| parent | 93fd462b581207d937c5d4eb939b1cc96c86c1f2 (diff) | |
Use ArgumentException.ThrowIfNullOrEmpty
Diffstat (limited to 'Jellyfin.Server.Implementations/Devices/DeviceManager.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Devices/DeviceManager.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index bbe33be38..15ac5c668 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)) { |
