Enable nullabe reference types for MediaBrowser.Model

This commit is contained in:
Bond_009
2020-04-05 18:10:56 +02:00
parent 29539174a3
commit 30ce346f34
208 changed files with 636 additions and 506 deletions

View File

@@ -12,9 +12,9 @@ namespace MediaBrowser.Model.Extensions
/// <returns>The string with the first character as uppercase.</returns>
public static string FirstToUpper(string str)
{
if (string.IsNullOrEmpty(str))
if (str.Length == 0)
{
return string.Empty;
return str;
}
if (char.IsUpper(str[0]))