Skip to content

Commit

Permalink
get rid of some redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
hkfgo committed Sep 26, 2024
1 parent 299ec6e commit b2d3458
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,8 @@ public string BuildBatchHashKey()
/// <summary>
/// Equality comparison override in case of hash collision
/// </summary>
public bool Equals(ScrapeDefinitionBatchProperties obj)
public bool Equals(ScrapeDefinitionBatchProperties other)
{
if (!(obj is ScrapeDefinitionBatchProperties))
return false;

ScrapeDefinitionBatchProperties other = obj;
return ResourceType == other.ResourceType && AzureMetricConfiguration.ToUniqueStringRepresentation() == other.AzureMetricConfiguration.ToUniqueStringRepresentation() && SubscriptionId == other.SubscriptionId && GetAggregationInterval().Equals(other.GetAggregationInterval());

Check warning on line 98 in src/Promitor.Core.Scraping/Configuration/Model/Metrics/ScrapeDefinitionBatchProperties.cs

View workflow job for this annotation

GitHub Actions / Code Quality (R#)

"[PossibleNullReferenceException] Possible 'System.NullReferenceException'" on /home/runner/work/promitor/promitor/src/Promitor.Core.Scraping/Configuration/Model/Metrics/ScrapeDefinitionBatchProperties.cs(98,4134)
}
}
Expand Down

0 comments on commit b2d3458

Please sign in to comment.