This is an automated email from the ASF dual-hosted git repository.
shoothzj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 759470502d [Improvement] fix string comparison in ZkClusterInitializer
(#4451)
759470502d is described below
commit 759470502dc52c6f5c77fea0f02d2884c6b8ad82
Author: Dmitry Kryukov <[email protected]>
AuthorDate: Wed Jun 26 08:59:41 2024 +0300
[Improvement] fix string comparison in ZkClusterInitializer (#4451)
---
.../bookkeeper/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 06ca7ab48c..f50ed0b50a 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 class ZkClusterInitializer implements
ClusterInitializer {
String ledgersPath = metadataServiceUri.getPath();
Optional<String> segmentStorePath;
- if (Strings.isNullOrEmpty(ledgersPath) || "/" ==
ledgersPath) {
+ if (Strings.isNullOrEmpty(ledgersPath) ||
"/".equals(ledgersPath)) {
segmentStorePath = Optional.empty();
} else {
segmentStorePath = Optional.of(ledgersPath);