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_r196936989
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
 ##########
 @@ -116,6 +116,14 @@ public static CuratorFramework newCurator(String 
zookeepers, int timeout, String
     }
   }
 
+  public static boolean pathExist(CuratorFramework curator, String zPath) {
+    try {
+      return curator.checkExists().forPath(zPath) != null;
+    } catch (Exception e) {
 
 Review comment:
   The more specific throw is good, but I think we can have a more specific 
catch here (and anywhere else where we `catch (Exception e)`. With Java 7 and 
later, we have the option of enumerating catching multiple checked exceptions 
if we need to ([multi-catch][1]).
   
   [1]: 
https://docs.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to