Merge pull request #1125 from JonHanna/null_propogate

Use null-propogation where applicable and useful.
This commit is contained in:
James Newton-King
2017-01-05 11:15:49 +13:00
committed by GitHub
19 changed files with 67 additions and 123 deletions
@@ -123,13 +123,7 @@ namespace Newtonsoft.Json.Utilities
return m.GetBaseDefinition();
}
m = propertyInfo.GetSetMethod(true);
if (m != null)
{
return m.GetBaseDefinition();
}
return null;
return propertyInfo.GetSetMethod(true)?.GetBaseDefinition();
}
public static bool IsPublic(PropertyInfo property)