curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [4/5] git commit: CURATOR-85 - Guava no longer has closeQuietly(). This change adds the implementation internally to Curator
Date Mon, 03 Feb 2014 18:57:56 GMT
CURATOR-85 - Guava no longer has closeQuietly(). This change adds the implementation internally to Curator


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

Branch: refs/heads/CURATOR-72
Commit: 863eaee2f11fe930601c3da3bce386263fb552c4
Parents: 20d8c06
Author: randgalt <randgalt@apache.org>
Authored: Mon Feb 3 13:55:50 2014 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Mon Feb 3 13:55:50 2014 -0500

----------------------------------------------------------------------
 .../org/apache/curator/ConnectionState.java     |  4 +-
 .../exhibitor/DefaultExhibitorRestClient.java   |  4 +-
 .../apache/curator/utils/CloseableUtils.java    | 70 ++++++++++++++++++++
 .../curator/TestSessionFailRetryLoop.java       | 10 +--
 .../TestExhibitorEnsembleProvider.java          |  6 +-
 .../src/main/java/cache/PathCacheExample.java   | 10 +--
 .../main/java/discovery/DiscoveryExample.java   | 16 ++---
 .../src/main/java/discovery/ExampleServer.java  |  4 +-
 .../main/java/leader/LeaderSelectorExample.java |  8 +--
 .../src/main/java/locking/LockingExample.java   |  6 +-
 .../imps/CuratorTempFrameworkImpl.java          |  4 +-
 .../curator/framework/imps/TestCompression.java |  8 +--
 .../framework/imps/TestFailedDeleteManager.java | 10 +--
 .../curator/framework/imps/TestFramework.java   |  6 +-
 .../framework/imps/TestFrameworkBackground.java |  8 +--
 .../framework/imps/TestFrameworkEdges.java      | 22 +++---
 .../curator/framework/imps/TestMultiClient.java |  6 +-
 .../framework/imps/TestNamespaceFacade.java     | 12 ++--
 .../framework/imps/TestNeverConnected.java      |  4 +-
 .../curator/framework/imps/TestReadOnly.java    |  6 +-
 .../framework/imps/TestTempFramework.java       |  6 +-
 .../framework/imps/TestWatcherIdentity.java     | 10 +--
 .../curator/framework/imps/TestWithCluster.java | 10 +--
 .../framework/recipes/leader/LeaderLatch.java   |  2 +-
 .../framework/recipes/locks/ChildReaper.java    |  4 +-
 .../recipes/locks/InterProcessSemaphore.java    |  6 +-
 .../recipes/locks/InterProcessSemaphoreV2.java  |  6 +-
 .../recipes/queue/DistributedQueue.java         |  4 +-
 .../framework/recipes/queue/QueueSharder.java   |  4 +-
 .../barriers/TestDistributedBarrier.java        | 10 +--
 .../barriers/TestDistributedDoubleBarrier.java  |  8 +--
 .../framework/recipes/cache/TestNodeCache.java  | 18 ++---
 .../recipes/cache/TestPathChildrenCache.java    | 24 +++----
 .../cache/TestPathChildrenCacheInCluster.java   |  8 +--
 .../recipes/leader/TestLeaderLatch.java         | 28 ++++----
 .../recipes/leader/TestLeaderLatchCluster.java  |  8 +--
 .../recipes/leader/TestLeaderSelector.java      | 22 +++---
 .../leader/TestLeaderSelectorCluster.java       | 10 +--
 .../leader/TestLeaderSelectorParticipants.java  | 10 +--
 .../leader/TestLeaderSelectorWithExecutor.java  |  6 +-
 .../recipes/locks/SemaphoreClient.java          |  4 +-
 .../recipes/locks/TestChildReaper.java          | 14 ++--
 .../locks/TestInterProcessMutexBase.java        |  8 +--
 .../locks/TestInterProcessReadWriteLock.java    | 12 ++--
 .../locks/TestInterProcessSemaphore.java        | 10 +--
 .../locks/TestInterProcessSemaphoreCluster.java | 14 ++--
 .../framework/recipes/locks/TestLockACLs.java   |  6 +-
 .../locks/TestLockCleanlinessWithFaults.java    |  4 +-
 .../framework/recipes/locks/TestReaper.java     | 38 +++++------
 .../nodes/TestPersistentEphemeralNode.java      |  8 +--
 .../queue/TestBoundedDistributedQueue.java      | 12 ++--
 .../queue/TestDistributedDelayQueue.java        | 14 ++--
 .../recipes/queue/TestDistributedIdQueue.java   | 10 +--
 .../queue/TestDistributedPriorityQueue.java     | 18 ++---
 .../recipes/queue/TestDistributedQueue.java     | 50 +++++++-------
 .../recipes/queue/TestQueueSharder.java         | 16 ++---
 .../queue/TestSimpleDistributedQueue.java       |  4 +-
 .../recipes/shared/TestSharedCount.java         |  4 +-
 .../x/discovery/details/ServiceCacheImpl.java   |  4 +-
 .../discovery/details/ServiceDiscoveryImpl.java |  6 +-
 .../curator/x/discovery/TestServiceCache.java   | 10 +--
 .../x/discovery/TestServiceDiscovery.java       | 12 ++--
 62 files changed, 388 insertions(+), 318 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-client/src/main/java/org/apache/curator/ConnectionState.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/ConnectionState.java b/curator-client/src/main/java/org/apache/curator/ConnectionState.java
index e02ee88..8ec0675 100644
--- a/curator-client/src/main/java/org/apache/curator/ConnectionState.java
+++ b/curator-client/src/main/java/org/apache/curator/ConnectionState.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.drivers.TracerDriver;
 import org.apache.curator.ensemble.EnsembleProvider;
 import org.apache.curator.utils.DebugUtils;
@@ -106,7 +106,7 @@ class ConnectionState implements Watcher, Closeable
     {
         log.debug("Closing");
 
-        Closeables.closeQuietly(ensembleProvider);
+        CloseableUtils.closeQuietly(ensembleProvider);
         try
         {
             zooKeeper.closeAndClear();

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-client/src/main/java/org/apache/curator/ensemble/exhibitor/DefaultExhibitorRestClient.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/ensemble/exhibitor/DefaultExhibitorRestClient.java b/curator-client/src/main/java/org/apache/curator/ensemble/exhibitor/DefaultExhibitorRestClient.java
index db17fe8..01b9525 100644
--- a/curator-client/src/main/java/org/apache/curator/ensemble/exhibitor/DefaultExhibitorRestClient.java
+++ b/curator-client/src/main/java/org/apache/curator/ensemble/exhibitor/DefaultExhibitorRestClient.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.ensemble.exhibitor;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import java.io.BufferedInputStream;
 import java.io.InputStream;
 import java.net.HttpURLConnection;
@@ -61,7 +61,7 @@ public class DefaultExhibitorRestClient implements ExhibitorRestClient
         }
         finally
         {
-            Closeables.closeQuietly(in);
+            CloseableUtils.closeQuietly(in);
         }
         return str.toString();
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java b/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
new file mode 100644
index 0000000..6b6a475
--- /dev/null
+++ b/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.utils;
+
+import com.google.common.io.Closeables;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.io.Closeable;
+import java.io.IOException;
+
+/**
+ * @author Andy Boothe <andy@sigpwned.com>
+ *         <p/>
+ *         This class adds back functionality that was removed in Guava v16.0.
+ */
+public class CloseableUtils
+{
+    private static final Logger log = LoggerFactory.getLogger(CloseableUtils.class);
+
+    /**
+     * <p>
+     * This method has been added because Guava has removed the
+     * {@code closeQuietly()} method from {@code Closeables} in v16.0. It's
+     * tempting simply to replace calls to {@code closeQuietly(closeable)}
+     * with calls to {@code close(closeable, true)} to close
+     * {@code Closeable}s while swallowing {@code IOException}s, but
+     * {@code close()} is declared as {@code throws IOException} whereas
+     * {@code closeQuietly()} is not, so it's not a drop-in replacement.
+     * </p>
+     * <p>
+     * On the whole, Guava is very backwards compatible. By fixing this nit,
+     * Curator can continue to support newer versions of Guava without having
+     * to bump its own dependency version.
+     * </p>
+     * <p>
+     * See <a href="https://issues.apache.org/jira/browse/CURATOR-85">https://issues.apache.org/jira/browse/CURATOR-85</a>
+     * </p>
+     */
+    public static void closeQuietly(Closeable closeable)
+    {
+        try
+        {
+            // Here we've instructed Guava to swallow the IOException
+            Closeables.close(closeable, true);
+        }
+        catch ( IOException e )
+        {
+            // We instructed Guava to swallow the IOException, so this should
+            // never happen. Since it did, log it.
+            log.error("IOException should not have been thrown.", e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java b/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
index c2a8a74..e209e40 100644
--- a/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
+++ b/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.test.KillSession;
 import org.apache.curator.test.Timing;
@@ -94,7 +94,7 @@ public class TestSessionFailRetryLoop extends BaseClassForTests
         finally
         {
             retryLoop.close();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -166,7 +166,7 @@ public class TestSessionFailRetryLoop extends BaseClassForTests
         finally
         {
             retryLoop.close();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -221,7 +221,7 @@ public class TestSessionFailRetryLoop extends BaseClassForTests
         finally
         {
             retryLoop.close();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -277,7 +277,7 @@ public class TestSessionFailRetryLoop extends BaseClassForTests
         finally
         {
             retryLoop.close();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-client/src/test/java/org/apache/curator/ensemble/exhibitor/TestExhibitorEnsembleProvider.java
----------------------------------------------------------------------
diff --git a/curator-client/src/test/java/org/apache/curator/ensemble/exhibitor/TestExhibitorEnsembleProvider.java b/curator-client/src/test/java/org/apache/curator/ensemble/exhibitor/TestExhibitorEnsembleProvider.java
index 701476a..b38cb43 100644
--- a/curator-client/src/test/java/org/apache/curator/ensemble/exhibitor/TestExhibitorEnsembleProvider.java
+++ b/curator-client/src/test/java/org/apache/curator/ensemble/exhibitor/TestExhibitorEnsembleProvider.java
@@ -19,7 +19,7 @@
 package org.apache.curator.ensemble.exhibitor;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.BaseClassForTests;
 import org.apache.curator.CuratorZookeeperClient;
 import org.apache.curator.RetryLoop;
@@ -114,7 +114,7 @@ public class TestExhibitorEnsembleProvider extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(provider);
+            CloseableUtils.closeQuietly(provider);
         }
     }
 
@@ -188,7 +188,7 @@ public class TestExhibitorEnsembleProvider extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(secondServer);
+            CloseableUtils.closeQuietly(secondServer);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-examples/src/main/java/cache/PathCacheExample.java
----------------------------------------------------------------------
diff --git a/curator-examples/src/main/java/cache/PathCacheExample.java b/curator-examples/src/main/java/cache/PathCacheExample.java
index 69b6ed2..eec01bc 100644
--- a/curator-examples/src/main/java/cache/PathCacheExample.java
+++ b/curator-examples/src/main/java/cache/PathCacheExample.java
@@ -19,7 +19,7 @@
 package cache;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.cache.ChildData;
@@ -63,9 +63,9 @@ public class PathCacheExample
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(server);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(server);
         }
     }
 
@@ -156,7 +156,7 @@ public class PathCacheExample
         {
             for ( ExampleServer server : servers )
             {
-                Closeables.closeQuietly(server);
+                CloseableUtils.closeQuietly(server);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-examples/src/main/java/discovery/DiscoveryExample.java
----------------------------------------------------------------------
diff --git a/curator-examples/src/main/java/discovery/DiscoveryExample.java b/curator-examples/src/main/java/discovery/DiscoveryExample.java
index 0d84bab..6313207 100644
--- a/curator-examples/src/main/java/discovery/DiscoveryExample.java
+++ b/curator-examples/src/main/java/discovery/DiscoveryExample.java
@@ -22,7 +22,7 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.ExponentialBackoffRetry;
@@ -67,12 +67,12 @@ public class DiscoveryExample
         {
             for ( ServiceProvider<InstanceDetails> cache : providers.values() )
             {
-                Closeables.closeQuietly(cache);
+                CloseableUtils.closeQuietly(cache);
             }
 
-            Closeables.closeQuietly(serviceDiscovery);
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(server);
+            CloseableUtils.closeQuietly(serviceDiscovery);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(server);
         }
     }
 
@@ -130,7 +130,7 @@ public class DiscoveryExample
         {
             for ( ExampleServer server : servers )
             {
-                Closeables.closeQuietly(server);
+                CloseableUtils.closeQuietly(server);
             }
         }
     }
@@ -188,7 +188,7 @@ public class DiscoveryExample
         }
         finally
         {
-            Closeables.closeQuietly(serviceDiscovery);
+            CloseableUtils.closeQuietly(serviceDiscovery);
         }
     }
 
@@ -229,7 +229,7 @@ public class DiscoveryExample
         }
 
         servers.remove(server);
-        Closeables.closeQuietly(server);
+        CloseableUtils.closeQuietly(server);
         System.out.println("Removed a random instance of: " + serviceName);
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-examples/src/main/java/discovery/ExampleServer.java
----------------------------------------------------------------------
diff --git a/curator-examples/src/main/java/discovery/ExampleServer.java b/curator-examples/src/main/java/discovery/ExampleServer.java
index 526dfee..96478f5 100644
--- a/curator-examples/src/main/java/discovery/ExampleServer.java
+++ b/curator-examples/src/main/java/discovery/ExampleServer.java
@@ -18,7 +18,7 @@
  */
 package discovery;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.x.discovery.ServiceDiscovery;
 import org.apache.curator.x.discovery.ServiceDiscoveryBuilder;
@@ -74,6 +74,6 @@ public class ExampleServer implements Closeable
     @Override
     public void close() throws IOException
     {
-        Closeables.closeQuietly(serviceDiscovery);
+        CloseableUtils.closeQuietly(serviceDiscovery);
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-examples/src/main/java/leader/LeaderSelectorExample.java
----------------------------------------------------------------------
diff --git a/curator-examples/src/main/java/leader/LeaderSelectorExample.java b/curator-examples/src/main/java/leader/LeaderSelectorExample.java
index 9e33180..85f0598 100644
--- a/curator-examples/src/main/java/leader/LeaderSelectorExample.java
+++ b/curator-examples/src/main/java/leader/LeaderSelectorExample.java
@@ -19,7 +19,7 @@
 package leader;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.ExponentialBackoffRetry;
@@ -67,14 +67,14 @@ public class LeaderSelectorExample
 
             for ( ExampleClient exampleClient : examples )
             {
-                Closeables.closeQuietly(exampleClient);
+                CloseableUtils.closeQuietly(exampleClient);
             }
             for ( CuratorFramework client : clients )
             {
-                Closeables.closeQuietly(client);
+                CloseableUtils.closeQuietly(client);
             }
 
-            Closeables.closeQuietly(server);
+            CloseableUtils.closeQuietly(server);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-examples/src/main/java/locking/LockingExample.java
----------------------------------------------------------------------
diff --git a/curator-examples/src/main/java/locking/LockingExample.java b/curator-examples/src/main/java/locking/LockingExample.java
index b6e7d63..dfe0801 100644
--- a/curator-examples/src/main/java/locking/LockingExample.java
+++ b/curator-examples/src/main/java/locking/LockingExample.java
@@ -18,7 +18,7 @@
  */
 package locking;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.ExponentialBackoffRetry;
@@ -71,7 +71,7 @@ public class LockingExample
                         }
                         finally
                         {
-                            Closeables.closeQuietly(client);
+                            CloseableUtils.closeQuietly(client);
                         }
                         return null;
                     }
@@ -84,7 +84,7 @@ public class LockingExample
         }
         finally
         {
-            Closeables.closeQuietly(server);
+            CloseableUtils.closeQuietly(server);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTempFrameworkImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTempFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTempFrameworkImpl.java
index b9984c0..01204d9 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTempFrameworkImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTempFrameworkImpl.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.imps;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.CuratorTempFramework;
 import org.apache.curator.framework.api.TempGetDataBuilder;
@@ -133,7 +133,7 @@ public class CuratorTempFrameworkImpl implements CuratorTempFramework
 
         if ( client != null )
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
             client = null;
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestCompression.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestCompression.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestCompression.java
index 215a0b5..2a8ec7c 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestCompression.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestCompression.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.CompressionProvider;
@@ -76,7 +76,7 @@ public class TestCompression extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
 
         Assert.assertEquals(compressCounter.get(), 1);
@@ -101,7 +101,7 @@ public class TestCompression extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -122,7 +122,7 @@ public class TestCompression extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
index f7a59af..fa27285 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.state.ConnectionState;
@@ -90,7 +90,7 @@ public class TestFailedDeleteManager extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -153,7 +153,7 @@ public class TestFailedDeleteManager extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -216,7 +216,7 @@ public class TestFailedDeleteManager extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -279,7 +279,7 @@ public class TestFailedDeleteManager extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
index cb441a8..7a9a386 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.imps;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.BackgroundCallback;
@@ -76,7 +76,7 @@ public class TestFramework extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -277,7 +277,7 @@ public class TestFramework extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
index 0439e4a..6e76931 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
@@ -20,7 +20,7 @@
 package org.apache.curator.framework.imps;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.BackgroundCallback;
@@ -86,7 +86,7 @@ public class TestFrameworkBackground extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -133,7 +133,7 @@ public class TestFrameworkBackground extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -167,7 +167,7 @@ public class TestFrameworkBackground extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
index 25ddf04..aec45b6 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
@@ -20,7 +20,7 @@
 package org.apache.curator.framework.imps;
 
 import com.google.common.collect.Queues;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.RetryPolicy;
 import org.apache.curator.RetrySleeper;
 import org.apache.curator.framework.CuratorFramework;
@@ -125,7 +125,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -148,7 +148,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -178,7 +178,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -197,7 +197,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -229,7 +229,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -268,7 +268,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -306,7 +306,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -331,7 +331,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -392,7 +392,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -426,7 +426,7 @@ public class TestFrameworkEdges extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
 
         try

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestMultiClient.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestMultiClient.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestMultiClient.java
index 57e9499..69d688b 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestMultiClient.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestMultiClient.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.CuratorEvent;
@@ -92,8 +92,8 @@ public class TestMultiClient extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client1);
-            Closeables.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client1);
+            CloseableUtils.closeQuietly(client2);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNamespaceFacade.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNamespaceFacade.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNamespaceFacade.java
index 3487046..c99dc85 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNamespaceFacade.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNamespaceFacade.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.RetryOneTime;
@@ -60,8 +60,8 @@ public class TestNamespaceFacade extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client2);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -84,7 +84,7 @@ public class TestNamespaceFacade extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -101,7 +101,7 @@ public class TestNamespaceFacade extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -124,7 +124,7 @@ public class TestNamespaceFacade extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNeverConnected.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNeverConnected.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNeverConnected.java
index 0402c45..6445d7b 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNeverConnected.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestNeverConnected.java
@@ -20,7 +20,7 @@
 package org.apache.curator.framework.imps;
 
 import com.google.common.collect.Queues;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.state.ConnectionState;
@@ -62,7 +62,7 @@ public class TestNeverConnected
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java
index 3b04cc0..537617c 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.state.ConnectionState;
@@ -96,8 +96,8 @@ public class TestReadOnly
             }
             finally
             {
-                Closeables.closeQuietly(client);
-                Closeables.closeQuietly(cluster);
+                CloseableUtils.closeQuietly(client);
+                CloseableUtils.closeQuietly(cluster);
             }
         }
         finally

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTempFramework.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTempFramework.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTempFramework.java
index 3cc47e9..a9e123e 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTempFramework.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTempFramework.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.CuratorTempFramework;
 import org.apache.curator.retry.RetryOneTime;
@@ -43,7 +43,7 @@ public class TestTempFramework extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -72,7 +72,7 @@ public class TestTempFramework extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatcherIdentity.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatcherIdentity.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatcherIdentity.java
index 9441a51..84ef025 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatcherIdentity.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatcherIdentity.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.CuratorWatcher;
@@ -107,7 +107,7 @@ public class TestWatcherIdentity extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -125,7 +125,7 @@ public class TestWatcherIdentity extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -149,7 +149,7 @@ public class TestWatcherIdentity extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -174,7 +174,7 @@ public class TestWatcherIdentity extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWithCluster.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWithCluster.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWithCluster.java
index 7d0e4b4..e846020 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWithCluster.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWithCluster.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.imps;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.state.ConnectionState;
@@ -64,8 +64,8 @@ public class TestWithCluster
         }
         finally
         {
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 
@@ -122,8 +122,8 @@ public class TestWithCluster
         }
         finally
         {
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
index dc37386..8d9a11f 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
@@ -312,7 +312,7 @@ public class LeaderLatch implements Closeable
     /**
      * Returns this instances current state, this is the only way to verify that the object has been closed before
      * closing again.  If you try to close a latch multiple times, the close() method will throw an
-     * IllegalArgumentException which is often not caught and ignored (Closeables.closeQuietly() only looks for
+     * IllegalArgumentException which is often not caught and ignored (CloseableUtils.closeQuietly() only looks for
      * IOException).
      *
      * @return the state of the current instance

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/ChildReaper.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/ChildReaper.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/ChildReaper.java
index c8c1510..0d9a53b 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/ChildReaper.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/ChildReaper.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.base.Preconditions;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.utils.CloseableScheduledExecutorService;
 import org.apache.curator.utils.ThreadUtils;
@@ -129,7 +129,7 @@ public class ChildReaper implements Closeable
     {
         if ( state.compareAndSet(State.STARTED, State.CLOSED) )
         {
-            Closeables.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(reaper);
             task.cancel(true);
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphore.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphore.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphore.java
index 54e4134..37fa95f 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphore.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphore.java
@@ -20,7 +20,7 @@ package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.recipes.shared.SharedCountListener;
 import org.apache.curator.framework.recipes.shared.SharedCountReader;
@@ -124,7 +124,7 @@ public class InterProcessSemaphore
     {
         for ( Lease l : leases )
         {
-            Closeables.closeQuietly(l);
+            CloseableUtils.closeQuietly(l);
         }
     }
 
@@ -135,7 +135,7 @@ public class InterProcessSemaphore
      */
     public void     returnLease(Lease lease)
     {
-        Closeables.closeQuietly(lease);
+        CloseableUtils.closeQuietly(lease);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
index 94b740e..52be756 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
@@ -21,7 +21,7 @@ package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.RetryLoop;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.api.PathAndBytesable;
@@ -176,7 +176,7 @@ public class InterProcessSemaphoreV2
     {
         for ( Lease l : leases )
         {
-            Closeables.closeQuietly(l);
+            CloseableUtils.closeQuietly(l);
         }
     }
 
@@ -187,7 +187,7 @@ public class InterProcessSemaphoreV2
      */
     public void returnLease(Lease lease)
     {
-        Closeables.closeQuietly(lease);
+        CloseableUtils.closeQuietly(lease);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
index 6e74579..f92071b 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
@@ -22,7 +22,7 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.api.BackgroundCallback;
 import org.apache.curator.framework.api.CuratorEvent;
@@ -217,7 +217,7 @@ public class DistributedQueue<T> implements QueueBase<T>
                 }
             }
 
-            Closeables.closeQuietly(childrenCache);
+            CloseableUtils.closeQuietly(childrenCache);
             putListenerContainer.clear();
             service.shutdownNow();
         }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/QueueSharder.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/QueueSharder.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/QueueSharder.java
index e35c71a..96170bd 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/QueueSharder.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/QueueSharder.java
@@ -23,7 +23,7 @@ import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.recipes.leader.LeaderLatch;
 import org.apache.curator.utils.ZKPaths;
@@ -147,7 +147,7 @@ public class QueueSharder<U, T extends QueueBase<U>> implements Closeable
         if ( state.compareAndSet(State.STARTED, State.CLOSED) )
         {
             service.shutdownNow();
-            Closeables.closeQuietly(leaderLatch);
+            CloseableUtils.closeQuietly(leaderLatch);
 
             for ( T queue : queues.values() )
             {

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedBarrier.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedBarrier.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedBarrier.java
index 13111cd..4926053 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedBarrier.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedBarrier.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.barriers;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -95,7 +95,7 @@ public class TestDistributedBarrier extends BaseClassForTests
                 }
                 finally
                 {
-                    Closeables.closeQuietly(client);
+                    CloseableUtils.closeQuietly(client);
                 }
             }
 
@@ -134,7 +134,7 @@ public class TestDistributedBarrier extends BaseClassForTests
                 }
                 finally
                 {
-                    Closeables.closeQuietly(client);
+                    CloseableUtils.closeQuietly(client);
                 }
             }
 
@@ -145,8 +145,8 @@ public class TestDistributedBarrier extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client1);
-            Closeables.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client1);
+            CloseableUtils.closeQuietly(client2);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedDoubleBarrier.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedDoubleBarrier.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedDoubleBarrier.java
index 79c0ce3..53bfeda 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedDoubleBarrier.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/barriers/TestDistributedDoubleBarrier.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.barriers;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -92,7 +92,7 @@ public class TestDistributedDoubleBarrier extends BaseClassForTests
                         }
                         finally
                         {
-                            Closeables.closeQuietly(client);
+                            CloseableUtils.closeQuietly(client);
                         }
 
                         return null;
@@ -161,7 +161,7 @@ public class TestDistributedDoubleBarrier extends BaseClassForTests
         finally
         {
             service.shutdown();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -233,7 +233,7 @@ public class TestDistributedDoubleBarrier extends BaseClassForTests
         {
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestNodeCache.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestNodeCache.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestNodeCache.java
index 900f5fe..c81619e 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestNodeCache.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestNodeCache.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.cache;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.UnhandledErrorListener;
@@ -97,8 +97,8 @@ public class TestNodeCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -160,8 +160,8 @@ public class TestNodeCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -203,8 +203,8 @@ public class TestNodeCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -251,8 +251,8 @@ public class TestNodeCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
index 4b117fb..7e7ae42 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.cache;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.api.UnhandledErrorListener;
@@ -70,8 +70,8 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -111,8 +111,8 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -165,8 +165,8 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -211,7 +211,7 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -239,7 +239,7 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -573,7 +573,7 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -638,8 +638,8 @@ public class TestPathChildrenCache extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCacheInCluster.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCacheInCluster.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCacheInCluster.java
index 99bbbb2..1144ede 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCacheInCluster.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCacheInCluster.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.cache;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.RetryOneTime;
@@ -93,9 +93,9 @@ public class TestPathChildrenCacheInCluster
         }
         finally
         {
-            Closeables.closeQuietly(cache);
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(cache);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
index 4741e76..f4b5590 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
@@ -21,7 +21,7 @@ package org.apache.curator.framework.recipes.leader;
 
 import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -74,8 +74,8 @@ public class TestLeaderLatch extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(latch);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(latch);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -105,7 +105,7 @@ public class TestLeaderLatch extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -161,9 +161,9 @@ public class TestLeaderLatch extends BaseClassForTests
         {
             for ( LeaderLatch latch : latches )
             {
-                Closeables.closeQuietly(latch);
+                CloseableUtils.closeQuietly(latch);
             }
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -204,9 +204,9 @@ public class TestLeaderLatch extends BaseClassForTests
 
             for ( LeaderLatch latch : latches )
             {
-                Closeables.closeQuietly(latch);
+                CloseableUtils.closeQuietly(latch);
             }
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
 
     }
@@ -262,7 +262,7 @@ public class TestLeaderLatch extends BaseClassForTests
         finally
         {
             executorService.shutdown();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -318,7 +318,7 @@ public class TestLeaderLatch extends BaseClassForTests
                         else
                         {
                             masterCounter.incrementAndGet();
-                            Closeables.closeQuietly(latch);
+                            CloseableUtils.closeQuietly(latch);
                             timesSquare.countDown();
                         }
                     }
@@ -358,10 +358,10 @@ public class TestLeaderLatch extends BaseClassForTests
             {
                 if ( latch.getState() != LeaderLatch.State.CLOSED )
                 {
-                    Closeables.closeQuietly(latch);
+                    CloseableUtils.closeQuietly(latch);
                 }
             }
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -431,9 +431,9 @@ public class TestLeaderLatch extends BaseClassForTests
         {
             for ( LeaderLatch latch : latches )
             {
-                Closeables.closeQuietly(latch);
+                CloseableUtils.closeQuietly(latch);
             }
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
index 90ec122..8744bd2 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.leader;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.ExponentialBackoffRetry;
@@ -89,10 +89,10 @@ public class TestLeaderLatchCluster
         {
             for ( ClientAndLatch client : clients )
             {
-                Closeables.closeQuietly(client.latch);
-                Closeables.closeQuietly(client.client);
+                CloseableUtils.closeQuietly(client.latch);
+                CloseableUtils.closeQuietly(client.client);
             }
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
index 63eeaf2..bfc8c97 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
@@ -20,7 +20,7 @@
 package org.apache.curator.framework.recipes.leader;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -77,8 +77,8 @@ public class TestLeaderSelector extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -125,8 +125,8 @@ public class TestLeaderSelector extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -187,8 +187,8 @@ public class TestLeaderSelector extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -225,8 +225,8 @@ public class TestLeaderSelector extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -269,8 +269,8 @@ public class TestLeaderSelector extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorCluster.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorCluster.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorCluster.java
index 88b598d..8f5d858 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorCluster.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorCluster.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.leader;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.state.ConnectionState;
@@ -79,8 +79,8 @@ public class TestLeaderSelectorCluster
         }
         finally
         {
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 
@@ -178,8 +178,8 @@ public class TestLeaderSelectorCluster
         }
         finally
         {
-            Closeables.closeQuietly(client);
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(client);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
index 0dd4c8b..778a1b6 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.leader;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -77,8 +77,8 @@ public class TestLeaderSelectorParticipants extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -165,9 +165,9 @@ public class TestLeaderSelectorParticipants extends BaseClassForTests
         {
             for ( LeaderSelector selector : selectors )
             {
-                Closeables.closeQuietly(selector);
+                CloseableUtils.closeQuietly(selector);
             }
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorWithExecutor.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorWithExecutor.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorWithExecutor.java
index 930b9fa..c34a25f 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorWithExecutor.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorWithExecutor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.leader;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -65,8 +65,8 @@ public class TestLeaderSelectorWithExecutor extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(leaderSelector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(leaderSelector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/SemaphoreClient.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/SemaphoreClient.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/SemaphoreClient.java
index 593d937..985e630 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/SemaphoreClient.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/SemaphoreClient.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.locks;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.state.ConnectionState;
@@ -109,7 +109,7 @@ class SemaphoreClient implements Callable<Void>, ConnectionStateListener, Closea
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
         return null;
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestChildReaper.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestChildReaper.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestChildReaper.java
index c38d2e9..e9b91f7 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestChildReaper.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestChildReaper.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.locks;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -64,8 +64,8 @@ public class TestChildReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -94,8 +94,8 @@ public class TestChildReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -134,8 +134,8 @@ public class TestChildReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/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 249f36c..b1373fa 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
@@ -20,7 +20,7 @@
 package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -123,7 +123,7 @@ public abstract class TestInterProcessMutexBase extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -463,8 +463,8 @@ public abstract class TestInterProcessMutexBase extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client1);
-            Closeables.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client1);
+            CloseableUtils.closeQuietly(client2);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java
index 08f3dd1..5b44c7c 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -100,7 +100,7 @@ public class TestInterProcessReadWriteLock extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -120,7 +120,7 @@ public class TestInterProcessReadWriteLock extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -171,7 +171,7 @@ public class TestInterProcessReadWriteLock extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -192,7 +192,7 @@ public class TestInterProcessReadWriteLock extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -240,7 +240,7 @@ public class TestInterProcessReadWriteLock extends BaseClassForTests
                         }
                         finally
                         {
-                            Closeables.closeQuietly(client);
+                            CloseableUtils.closeQuietly(client);
                         }
                         return null;
                     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
index 35bb876..2109417 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
@@ -20,7 +20,7 @@
 package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -98,7 +98,7 @@ public class TestInterProcessSemaphore extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -135,8 +135,8 @@ public class TestInterProcessSemaphore extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client1);
-            Closeables.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client1);
+            CloseableUtils.closeQuietly(client2);
         }
     }
 
@@ -511,7 +511,7 @@ public class TestInterProcessSemaphore extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphoreCluster.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphoreCluster.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphoreCluster.java
index 079dfaf..b3f7a25 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphoreCluster.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphoreCluster.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.locks;
 
 import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.ensemble.EnsembleProvider;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -140,14 +140,14 @@ public class TestInterProcessSemaphoreCluster
                                         if ( lease != null )
                                         {
                                             acquireCount.decrementAndGet();
-                                            Closeables.closeQuietly(lease);
+                                            CloseableUtils.closeQuietly(lease);
                                         }
                                     }
                                 }
                             }
                             finally
                             {
-                                Closeables.closeQuietly(client);
+                                CloseableUtils.closeQuietly(client);
                             }
                             return null;
                         }
@@ -178,7 +178,7 @@ public class TestInterProcessSemaphoreCluster
             executorService.shutdown();
             executorService.awaitTermination(10, TimeUnit.SECONDS);
             executorService.shutdownNow();
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(cluster);
         }
     }
 
@@ -249,7 +249,7 @@ public class TestInterProcessSemaphoreCluster
             }
             finally
             {
-                Closeables.closeQuietly(client);
+                CloseableUtils.closeQuietly(client);
             }
 
             long        startTicks = System.currentTimeMillis();
@@ -286,9 +286,9 @@ public class TestInterProcessSemaphoreCluster
         {
             for ( SemaphoreClient semaphoreClient : semaphoreClients )
             {
-                Closeables.closeQuietly(semaphoreClient);
+                CloseableUtils.closeQuietly(semaphoreClient);
             }
-            Closeables.closeQuietly(cluster);
+            CloseableUtils.closeQuietly(cluster);
             executorService.shutdownNow();
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockACLs.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockACLs.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockACLs.java
index cc933d8..e6e7418 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockACLs.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockACLs.java
@@ -19,7 +19,7 @@
 
 package org.apache.curator.framework.recipes.locks;
 
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.RetryPolicy;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -74,7 +74,7 @@ public class TestLockACLs extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -93,4 +93,4 @@ public class TestLockACLs extends BaseClassForTests
             return ACLS;
         }
     }
-}
\ No newline at end of file
+}


Mime
View raw message