Skip to content

Commit 99cf283

Browse files
committed
Cloud.name should be part of equals/hashCode
1 parent 6a47aec commit 99cf283

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,8 @@ public boolean equals(Object o) {
661661
if (this == o) return true;
662662
if (o == null || getClass() != o.getClass()) return false;
663663
KubernetesCloud that = (KubernetesCloud) o;
664-
return skipTlsVerify == that.skipTlsVerify &&
664+
return Objects.equals(name, that.name) &&
665+
skipTlsVerify == that.skipTlsVerify &&
665666
addMasterProxyEnvVars == that.addMasterProxyEnvVars &&
666667
capOnlyOnAlivePods == that.capOnlyOnAlivePods &&
667668
Objects.equals(containerCap, that.containerCap) &&
@@ -687,7 +688,7 @@ public boolean equals(Object o) {
687688

688689
@Override
689690
public int hashCode() {
690-
return Objects.hash(defaultsProviderTemplate, templates, serverUrl, serverCertificate, skipTlsVerify,
691+
return Objects.hash(name, defaultsProviderTemplate, templates, serverUrl, serverCertificate, skipTlsVerify,
691692
addMasterProxyEnvVars, capOnlyOnAlivePods, namespace, jnlpregistry, jenkinsUrl, jenkinsTunnel, credentialsId,
692693
containerCap, retentionTimeout, connectTimeout, readTimeout, podLabels, usageRestricted,
693694
maxRequestsPerHost, podRetention, useJenkinsProxy);

0 commit comments

Comments
 (0)