You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by am...@apache.org on 2019/11/14 09:51:31 UTC
[aries-rsa] 04/09: Remove redundant null check
This is an automated email from the ASF dual-hosted git repository.
amichai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-rsa.git
commit b9c6459f3fb1220f9fdfe6ccce5ce843bd8516e5
Author: Amichai Rothman <am...@apache.org>
AuthorDate: Wed Nov 13 09:47:42 2019 +0200
Remove redundant null check
---
.../rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java
index 7571956..7880489 100644
--- a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java
+++ b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java
@@ -137,8 +137,7 @@ public class ZookeeperEndpointRepository {
}
static String getZooKeeperPath(String name) {
- String escaped = name.replace('/', '#');
- return name == null || name.isEmpty() ? PATH_PREFIX : PATH_PREFIX + '/' + escaped;
+ return name.isEmpty() ? PATH_PREFIX : PATH_PREFIX + '/' + name.replace('/', '#');
}
private void createBasePath() throws KeeperException, InterruptedException {