Skip to content

Commit ac9c5f4

Browse files
committed
Fix equals/hashcode on SslConfiguration
Because profiles rely on looking up the configuration as a key in a map, we need equals to include `explicitlyConfigured`
1 parent 3dd212d commit ac9c5f4

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

libs/ssl-config/src/main/java/org/elasticsearch/common/ssl/SslConfiguration.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -157,34 +157,4 @@ private String contextProtocol() {
157157
"no supported SSL/TLS protocol was found in the configured supported protocols: " + supportedProtocols
158158
);
159159
}
160-
161-
// TODO Add explicitlyConfigured to equals&hashCode?
162-
@Override
163-
public boolean equals(Object o) {
164-
if (this == o) return true;
165-
if (o == null || getClass() != o.getClass()) return false;
166-
final SslConfiguration that = (SslConfiguration) o;
167-
return Objects.equals(this.settingPrefix, that.settingPrefix)
168-
&& Objects.equals(this.trustConfig, that.trustConfig)
169-
&& Objects.equals(this.keyConfig, that.keyConfig)
170-
&& this.verificationMode == that.verificationMode
171-
&& this.clientAuth == that.clientAuth
172-
&& Objects.equals(this.ciphers, that.ciphers)
173-
&& Objects.equals(this.supportedProtocols, that.supportedProtocols)
174-
&& this.handshakeTimeoutMillis == that.handshakeTimeoutMillis;
175-
}
176-
177-
@Override
178-
public int hashCode() {
179-
return Objects.hash(
180-
settingPrefix,
181-
trustConfig,
182-
keyConfig,
183-
verificationMode,
184-
clientAuth,
185-
ciphers,
186-
supportedProtocols,
187-
handshakeTimeoutMillis
188-
);
189-
}
190160
}

0 commit comments

Comments
 (0)