Repository: curator
Updated Branches:
  refs/heads/persistent-watch 79de36d56 -> cbc3b7985


doh - didn't mean to include these changes


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/cbc3b798
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/cbc3b798
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/cbc3b798

Branch: refs/heads/persistent-watch
Commit: cbc3b7985fb7b4ac69a2b2f171c328d2e48c0c75
Parents: 79de36d
Author: randgalt <[email protected]>
Authored: Thu Oct 5 16:16:44 2017 +0200
Committer: randgalt <[email protected]>
Committed: Thu Oct 5 16:16:44 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/curator/RetryLoop.java    |  6 ++----
 .../recipes/locks/TestInterProcessMutexBase.java       | 13 ++-----------
 2 files changed, 4 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/cbc3b798/curator-client/src/main/java/org/apache/curator/RetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/RetryLoop.java 
b/curator-client/src/main/java/org/apache/curator/RetryLoop.java
index 7b6bff2..51df662 100644
--- a/curator-client/src/main/java/org/apache/curator/RetryLoop.java
+++ b/curator-client/src/main/java/org/apache/curator/RetryLoop.java
@@ -18,7 +18,6 @@
  */
 package org.apache.curator;
 
-import com.google.common.base.Throwables;
 import org.apache.curator.drivers.EventTrace;
 import org.apache.curator.drivers.TracerDriver;
 import org.apache.curator.utils.DebugUtils;
@@ -148,10 +147,9 @@ public class RetryLoop
      */
     public static boolean      isRetryException(Throwable exception)
     {
-        Throwable rootCause = Throwables.getRootCause(exception);
-        if ( rootCause instanceof KeeperException )
+        if ( exception instanceof KeeperException )
         {
-            KeeperException keeperException = (KeeperException)rootCause;
+            KeeperException     keeperException = (KeeperException)exception;
             return shouldRetry(keeperException.code().intValue());
         }
         return false;

http://git-wip-us.apache.org/repos/asf/curator/blob/cbc3b798/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
----------------------------------------------------------------------
diff --git 
a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
 
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
index 1662dd4..cf44daf 100644
--- 
a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
+++ 
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
@@ -19,7 +19,6 @@
 
 package org.apache.curator.framework.recipes.locks;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -134,17 +133,9 @@ public abstract class TestInterProcessMutexBase extends 
BaseClassForTests
                                 {
                                     lock.release();
                                 }
-                                catch ( Exception e )
+                                catch ( 
KeeperException.SessionExpiredException dummy )
                                 {
-                                    //noinspection StatementWithEmptyBody
-                                    if ( Throwables.getRootCause(e) instanceof 
KeeperException.SessionExpiredException )
-                                    {
-                                        // happens sometimes with a few tests 
- ignore
-                                    }
-                                    else
-                                    {
-                                        throw e;
-                                    }
+                                    // happens sometimes with a few tests - 
ignore
                                 }
                             }
                             return result;

Reply via email to