From 92e7a0f85ff090087184806f7329e15dbfeb7cd2 Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Tue, 25 Jun 2024 21:21:43 +0300 Subject: [PATCH] [Improvement] fixed string comparison --- .../stream/storage/impl/cluster/ZkClusterInitializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterInitializer.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterInitializer.java index 06ca7ab48c4..f50ed0b50a3 100644 --- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterInitializer.java +++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterInitializer.java @@ -77,7 +77,7 @@ public boolean initializeCluster(URI metadataServiceUri, int numStorageContainer String ledgersPath = metadataServiceUri.getPath(); Optional segmentStorePath; - if (Strings.isNullOrEmpty(ledgersPath) || "/" == ledgersPath) { + if (Strings.isNullOrEmpty(ledgersPath) || "/".equals(ledgersPath)) { segmentStorePath = Optional.empty(); } else { segmentStorePath = Optional.of(ledgersPath);