Fixed Azure Pipeline build warnings (#1254)

* Fixed Azure Pipeline build warnings

* Removed variable declaration in SmoScriptableOperationWithFullDbAccess catch block.
This commit is contained in:
Justin M
2021-10-04 13:30:43 -07:00
committed by GitHub
parent 3442c08012
commit 0c95a511d0
10 changed files with 23 additions and 60 deletions

View File

@@ -11,8 +11,6 @@ using System.Resources;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using Microsoft.SqlServer.Management.Diagnostics;
using System.Globalization;
using Microsoft.Data.SqlClient;
using System.Collections.Generic;
using System.Diagnostics;
@@ -362,7 +360,7 @@ WHERE do.database_id = @DbID
}
else
{
throw ex;
throw;
}
}
@@ -574,7 +572,7 @@ WHERE do.database_id = @DbID
}
else
{
throw ex;
throw;
}
}

View File

@@ -9,11 +9,8 @@ using Microsoft.SqlTools.ServiceLayer.Admin.Contracts;
using Microsoft.SqlTools.ServiceLayer.Management;
using Microsoft.SqlTools.Utility;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Xml;
namespace Microsoft.SqlTools.ServiceLayer.Admin
@@ -168,8 +165,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
private static string GetBackupDate(DateTime backupDate)
{
if (backupDate == null
|| backupDate < minBackupDate)
if (backupDate < minBackupDate)
{
return SR.NeverBackedUp;
}