You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2018/06/19 22:37:55 UTC

[GitHub] ctubbsii commented on a change in pull request #1043: FLUO-1002 Create integration test for `FluoAdmin.remove()`

ctubbsii commented on a change in pull request #1043: FLUO-1002 Create integration test for `FluoAdmin.remove()`
URL: https://github.com/apache/fluo/pull/1043#discussion_r196600581
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
 ##########
 @@ -116,6 +116,15 @@ public static CuratorFramework newCurator(String zookeepers, int timeout, String
     }
   }
 
+  public static boolean pathExist(CuratorFramework curator, String zPath) {
+    try {
+      return curator.checkExists().forPath(zPath) != null
+          && !curator.getChildren().forPath(zPath).isEmpty();
+    } catch (Exception e) {
+      throw new RuntimeException(e);
 
 Review comment:
   This is a very overly broad catch statement, and a very generic RTE. Is there any way these can be made more narrow? Like, just catch the checked exceptions that are thrown, and throw a specific RTE, like IllegalStateException or IllegalArgumentException?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services