aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-10-13 19:08:00 +0200
committerBond_009 <bond.009@outlook.com>2022-12-07 16:43:59 +0100
commitb366dc2e6e5be2b93f2b6fcc4549a32b655c3806 (patch)
tree8f7ee8407e31e58db9aabe74bfc21936275ec45e /Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
parent93fd462b581207d937c5d4eb939b1cc96c86c1f2 (diff)
Use ArgumentException.ThrowIfNullOrEmpty
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteUserDataRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteUserDataRepository.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
index 8d78d644d..5f2c3c9dc 100644
--- a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
@@ -140,10 +140,7 @@ namespace Emby.Server.Implementations.Data
throw new ArgumentNullException(nameof(userId));
}
- if (string.IsNullOrEmpty(key))
- {
- throw new ArgumentNullException(nameof(key));
- }
+ ArgumentException.ThrowIfNullOrEmpty(key);
PersistUserData(userId, key, userData, cancellationToken);
}
@@ -274,10 +271,7 @@ namespace Emby.Server.Implementations.Data
throw new ArgumentNullException(nameof(userId));
}
- if (string.IsNullOrEmpty(key))
- {
- throw new ArgumentNullException(nameof(key));
- }
+ ArgumentException.ThrowIfNullOrEmpty(key);
using (var connection = GetConnection(true))
{