mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-21 08:15:28 +03:00
Use ArgumentException.ThrowIfNullOrEmpty
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user