From ab23742a8271e784f7eba3390e60c9ed37c1a5ee Mon Sep 17 00:00:00 2001 From: wei <493703217@qq.com> Date: Sun, 1 Sep 2024 15:35:32 +0800 Subject: [PATCH] chore: rename function (#25) Signed-off-by: wei <493703217@qq.com> --- .../io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilder.java | 2 +- .../protocol/pulsar/admin/jdk/PulsarAdminBuilderImpl.java | 2 +- .../java/io/github/protocol/pulsar/admin/jdk/TlsClientTest.java | 2 +- .../protocol/pulsar/admin/jdk/TlsClientWrongHostTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilder.java b/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilder.java index fc636ff..116791f 100644 --- a/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilder.java +++ b/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilder.java @@ -9,7 +9,7 @@ public interface PulsarAdminBuilder { PulsarAdminBuilder port(int port); - PulsarAdminBuilder useSsl(boolean useSsl); + PulsarAdminBuilder tlsEnabled(boolean useSsl); PulsarAdminBuilder tlsConfig(TlsConfig tlsConfig); diff --git a/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilderImpl.java b/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilderImpl.java index d5ca472..8126a29 100644 --- a/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilderImpl.java +++ b/pulsar-admin-jdk/src/main/java/io/github/protocol/pulsar/admin/jdk/PulsarAdminBuilderImpl.java @@ -28,7 +28,7 @@ public PulsarAdminBuilder port(int port) { } @Override - public PulsarAdminBuilder useSsl(boolean useSsl) { + public PulsarAdminBuilder tlsEnabled(boolean useSsl) { this.conf.tlsEnabled(useSsl); return this; } diff --git a/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientTest.java b/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientTest.java index ae1111a..bb66cf8 100644 --- a/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientTest.java +++ b/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientTest.java @@ -46,7 +46,7 @@ public static void setup() throws Exception { private PulsarAdmin createPulsarAdmin(TlsConfig tlsConfig) throws PulsarAdminException { return PulsarAdmin.builder() .port(server.getWebPort()) - .useSsl(true) + .tlsEnabled(true) .tlsConfig(tlsConfig) .build(); } diff --git a/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientWrongHostTest.java b/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientWrongHostTest.java index 7ad4504..bb7c5dc 100644 --- a/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientWrongHostTest.java +++ b/pulsar-admin-jdk/src/test/java/io/github/protocol/pulsar/admin/jdk/TlsClientWrongHostTest.java @@ -58,7 +58,7 @@ public void testTlsByVerifyAndNoHostnameVerification() throws PulsarAdminExcepti ); PulsarAdmin pulsarAdmin = PulsarAdmin.builder() .port(server.getWebPort()) - .useSsl(true) + .tlsEnabled(true) .tlsConfig(tlsConfig) .build(); Assertions.assertThrows(PulsarAdminException.class, () -> pulsarAdmin.brokers().healthcheck(TopicVersion.V1));