You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/05 06:27:06 UTC

[GitHub] [zookeeper] TisonKun commented on a change in pull request #1478: ZOOKEEPER-3952: Remove commons-lang from ZooKeeper

TisonKun commented on a change in pull request #1478:
URL: https://github.com/apache/zookeeper/pull/1478#discussion_r499367641



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/common/PathTrie.java
##########
@@ -344,4 +345,10 @@ public void clear() {
          }
      }
 
+     private static String[] split(final String path){
+         return Stream.of(path.split("/"))
+                 .filter(t -> (t != null && !t.trim().isEmpty()))

Review comment:
       is this filter semantically different from commons-lang's `StringUtils.split`? IIRC validation has been done before passed into `PathTrie` or at least this method seems more than just split path but also validate and filter things.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org