Remove unnecessary null check

Split function always return array. If you look at the source of it, it even guarantees it with code contracts
This commit is contained in:
Ivan Bidolakh 2018-04-29 01:54:42 +03:00
parent d4b050148b
commit d7d3ce4fc1
2 changed files with 4 additions and 4 deletions

View file

@ -41,7 +41,7 @@ public static XElement GetNode(this XContainer element, string path)
string[] splitPath = path.Split('/');
if (splitPath != null && splitPath.Length > 0)
if (splitPath.Length > 0)
{
foreach (string name in splitPath)
{

View file

@ -90,7 +90,7 @@ public string Login(string email, string password)
{
string[] values = response.Split(',');
if (values != null && values.Length > 1)
if (values.Length > 1)
{
int status;
@ -119,7 +119,7 @@ public bool DeleteFile(string id)
{
string[] lines = response.Lines();
if (lines != null && lines.Length > 0)
if (lines.Length > 0)
{
int status;
@ -144,7 +144,7 @@ public override UploadResult Upload(Stream stream, string fileName)
{
string[] values = result.Response.Split(',');
if (values != null && values.Length > 0)
if (values.Length > 0)
{
int status;