Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-tkachenko-datadog committed Jan 26, 2024
1 parent c793cf8 commit eeeb4c2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ of this software and associated documentation files (the "Software"), to deal

package org.datadog.jenkins.plugins.datadog.clients;

import com.google.common.base.Objects;
import hudson.util.Secret;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -126,10 +127,10 @@ public static DatadogClient getInstance(String url, String logIntakeUrl, String
}

private static boolean configurationChanged(String url, String logIntakeUrl, String webhookIntakeUrl, Secret apiKey){
return !instance.getUrl().equals(url) ||
!instance.getLogIntakeUrl().equals(logIntakeUrl) ||
!instance.getWebhookIntakeUrl().equals(webhookIntakeUrl) ||
!instance.getApiKey().equals(apiKey);
return !Objects.equal(instance.getUrl(), url) ||
!Objects.equal(instance.getLogIntakeUrl(), logIntakeUrl) ||
!Objects.equal(instance.getWebhookIntakeUrl(), webhookIntakeUrl) ||
!Objects.equal(instance.getApiKey(), apiKey);
}

private DatadogApiClient(String url, String logIntakeUrl, String webhookIntakeUrl, Secret apiKey) {
Expand Down

0 comments on commit eeeb4c2

Please sign in to comment.