From 8883d16051871398b7a2285fef192fcb536cc074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= <514737+acogoluegnes@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:11:11 +0200 Subject: [PATCH] Remove deprecated TlsConfiguration#hostnameVerification methods References #740 --- .../rabbitmq/stream/EnvironmentBuilder.java | 25 ------------------- .../stream/impl/StreamEnvironmentBuilder.java | 14 ----------- 2 files changed, 39 deletions(-) diff --git a/src/main/java/com/rabbitmq/stream/EnvironmentBuilder.java b/src/main/java/com/rabbitmq/stream/EnvironmentBuilder.java index 33fac4dcbc..4c8a5239f5 100644 --- a/src/main/java/com/rabbitmq/stream/EnvironmentBuilder.java +++ b/src/main/java/com/rabbitmq/stream/EnvironmentBuilder.java @@ -436,31 +436,6 @@ EnvironmentBuilder topologyUpdateBackOffDelayPolicy( /** Helper to configure TLS. */ interface TlsConfiguration { - /** - * Enable hostname verification. - * - *
Hostname verification is enabled by default. - * - * @return the TLS configuration helper - * @deprecated use {@link SslContextBuilder#endpointIdentificationAlgorithm(String)} with {@link - * #sslContext(SslContext)} - */ - @Deprecated(forRemoval = true) - TlsConfiguration hostnameVerification(); - - /** - * Enable or disable hostname verification. - * - *
Hostname verification is enabled by default. - * - * @param hostnameVerification whether to enable hostname verification or not - * @return the TLS configuration helper - * @deprecated use {@link SslContextBuilder#endpointIdentificationAlgorithm(String)} with {@link - * #sslContext(SslContext)} - */ - @Deprecated(forRemoval = true) - TlsConfiguration hostnameVerification(boolean hostnameVerification); - /** * Netty {@link SslContext} for TLS connections. * diff --git a/src/main/java/com/rabbitmq/stream/impl/StreamEnvironmentBuilder.java b/src/main/java/com/rabbitmq/stream/impl/StreamEnvironmentBuilder.java index bf7f395fca..f3b38cb884 100644 --- a/src/main/java/com/rabbitmq/stream/impl/StreamEnvironmentBuilder.java +++ b/src/main/java/com/rabbitmq/stream/impl/StreamEnvironmentBuilder.java @@ -372,20 +372,6 @@ private DefaultTlsConfiguration(EnvironmentBuilder environmentBuilder) { this.environmentBuilder = environmentBuilder; } - @Override - @SuppressWarnings("removal") - public TlsConfiguration hostnameVerification() { - this.hostnameVerification = true; - return this; - } - - @Override - @SuppressWarnings("removal") - public TlsConfiguration hostnameVerification(boolean hostnameVerification) { - this.hostnameVerification = hostnameVerification; - return this; - } - @Override public TlsConfiguration sslContext(SslContext sslContext) { this.sslContext = sslContext;