Code Clean up: Convert to null-coalescing operator ?? (#5845)

Co-authored-by: Cody Robibero <cody@robibe.ro>
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
This commit is contained in:
BaronGreenback
2021-05-05 12:51:14 +01:00
committed by GitHub
parent 04447ed014
commit 2e98de9062
27 changed files with 60 additions and 200 deletions

View File

@@ -111,10 +111,7 @@ namespace MediaBrowser.Providers.MediaInfo
}
}
if (streamFileNames == null)
{
streamFileNames = Array.Empty<string>();
}
streamFileNames ??= Array.Empty<string>();
mediaInfoResult = await GetMediaInfo(item, cancellationToken).ConfigureAwait(false);

View File

@@ -256,10 +256,7 @@ namespace MediaBrowser.Providers.Subtitles
}
catch (Exception ex)
{
if (exceptionToThrow == null)
{
exceptionToThrow = ex;
}
exceptionToThrow ??= ex;
}
finally
{