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 /MediaBrowser.Controller/Entities/PeopleHelper.cs | |
| parent | 93fd462b581207d937c5d4eb939b1cc96c86c1f2 (diff) | |
Use ArgumentException.ThrowIfNullOrEmpty
Diffstat (limited to 'MediaBrowser.Controller/Entities/PeopleHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/PeopleHelper.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/Entities/PeopleHelper.cs b/MediaBrowser.Controller/Entities/PeopleHelper.cs index 44c0e2539..7f8dc069c 100644 --- a/MediaBrowser.Controller/Entities/PeopleHelper.cs +++ b/MediaBrowser.Controller/Entities/PeopleHelper.cs @@ -12,11 +12,7 @@ namespace MediaBrowser.Controller.Entities public static void AddPerson(List<PersonInfo> people, PersonInfo person) { ArgumentNullException.ThrowIfNull(person); - - if (string.IsNullOrEmpty(person.Name)) - { - throw new ArgumentException("The person's name was empty or null.", nameof(person)); - } + ArgumentException.ThrowIfNullOrEmpty(person.Name); // Normalize if (string.Equals(person.Role, PersonType.GuestStar, StringComparison.OrdinalIgnoreCase)) |
