curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/2] CURATOR-85 - Guava no longer has closeQuietly(). This change adds the implementation internally to Curator
Date Mon, 03 Feb 2014 18:56:08 GMT
Updated Branches:
  refs/heads/CURATOR-85 [created] 863eaee2f


http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java
index 2992c8e..b1b9c78 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.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;
@@ -67,7 +67,7 @@ public class TestLockCleanlinessWithFaults 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/TestReaper.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestReaper.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestReaper.java
index bd821e4..b11bc8b 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestReaper.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestReaper.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 junit.framework.Assert;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -67,7 +67,7 @@ public class TestReaper extends BaseClassForTests
                 }
                 finally
                 {
-                    Closeables.closeQuietly(reaper);
+                    CloseableUtils.closeQuietly(reaper);
                 }
             }
 
@@ -91,8 +91,8 @@ public class TestReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(selector);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(selector);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -180,8 +180,8 @@ public class TestReaper extends BaseClassForTests
             {
                 watcher.cancel(true);
             }
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -283,8 +283,8 @@ public class TestReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -313,8 +313,8 @@ public class TestReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -361,8 +361,8 @@ public class TestReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -428,8 +428,8 @@ public class TestReaper extends BaseClassForTests
         finally
         {
             service.shutdownNow();
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -471,9 +471,9 @@ public class TestReaper extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(reaper);
-            Closeables.closeQuietly(client2);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(reaper);
+            CloseableUtils.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -499,8 +499,8 @@ public class TestReaper 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/nodes/TestPersistentEphemeralNode.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestPersistentEphemeralNode.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestPersistentEphemeralNode.java
index 0b11d8e..e312081 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestPersistentEphemeralNode.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestPersistentEphemeralNode.java
@@ -20,7 +20,7 @@ package org.apache.curator.framework.recipes.nodes;
 
 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 org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -117,7 +117,7 @@ public class TestPersistentEphemeralNode extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -160,7 +160,7 @@ public class TestPersistentEphemeralNode extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -525,4 +525,4 @@ public class TestPersistentEphemeralNode extends BaseClassForTests
             return new Trigger(Event.EventType.NodeDeleted);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestBoundedDistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestBoundedDistributedQueue.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestBoundedDistributedQueue.java
index 8a344dd..6662b7d 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestBoundedDistributedQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestBoundedDistributedQueue.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.queue;
 
-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;
@@ -158,8 +158,8 @@ public class TestBoundedDistributedQueue extends BaseClassForTests
                             }
                             finally
                             {
-                                Closeables.closeQuietly(queue);
-                                Closeables.closeQuietly(client);
+                                CloseableUtils.closeQuietly(queue);
+                                CloseableUtils.closeQuietly(client);
                             }
                             return null;
                         }
@@ -186,7 +186,7 @@ public class TestBoundedDistributedQueue extends BaseClassForTests
         finally
         {
             executor.shutdownNow();
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -260,8 +260,8 @@ public class TestBoundedDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedDelayQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedDelayQueue.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedDelayQueue.java
index 45eec3d..ecce020 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedDelayQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedDelayQueue.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.queue;
 
-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;
@@ -59,8 +59,8 @@ public class TestDistributedDelayQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -86,8 +86,8 @@ public class TestDistributedDelayQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -124,8 +124,8 @@ public class TestDistributedDelayQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedIdQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedIdQueue.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedIdQueue.java
index 1fb0325..9b74199 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedIdQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedIdQueue.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.queue;
 
 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 TestDistributedIdQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -120,8 +120,8 @@ public class TestDistributedIdQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedPriorityQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedPriorityQueue.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedPriorityQueue.java
index 338ada3..e5c5e73 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedPriorityQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedPriorityQueue.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.queue;
 
-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;
@@ -70,8 +70,8 @@ public class TestDistributedPriorityQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -115,8 +115,8 @@ public class TestDistributedPriorityQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -164,8 +164,8 @@ public class TestDistributedPriorityQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -226,8 +226,8 @@ public class TestDistributedPriorityQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
index 0e33b80..02fc5d6 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
@@ -20,7 +20,7 @@ package org.apache.curator.framework.recipes.queue;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
-import com.google.common.io.Closeables;
+import org.apache.curator.utils.CloseableUtils;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import org.apache.curator.framework.CuratorFramework;
@@ -113,8 +113,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -206,8 +206,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -264,8 +264,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
     
@@ -415,11 +415,11 @@ public class TestDistributedQueue extends BaseClassForTests
         {
             for ( DistributedQueue<TestQueueItem> consumer : consumers )
             {
-                 Closeables.closeQuietly(consumer);
+                 CloseableUtils.closeQuietly(consumer);
             }
             for ( CuratorFramework curatorFramework : consumerClients )
             {
-                Closeables.closeQuietly(curatorFramework);
+                CloseableUtils.closeQuietly(curatorFramework);
             }
         }
     }
@@ -539,13 +539,13 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(producerQueue);
-            Closeables.closeQuietly(consumerQueue1);
-            Closeables.closeQuietly(consumerQueue2);
+            CloseableUtils.closeQuietly(producerQueue);
+            CloseableUtils.closeQuietly(consumerQueue1);
+            CloseableUtils.closeQuietly(consumerQueue2);
 
-            Closeables.closeQuietly(producerClient);
-            Closeables.closeQuietly(consumerClient1);
-            Closeables.closeQuietly(consumerClient2);
+            CloseableUtils.closeQuietly(producerClient);
+            CloseableUtils.closeQuietly(consumerClient1);
+            CloseableUtils.closeQuietly(consumerClient2);
         }
     }
 
@@ -604,8 +604,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -649,8 +649,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -689,8 +689,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -748,8 +748,8 @@ public class TestDistributedQueue extends BaseClassForTests
                 latch.countDown();
             }
 
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -788,8 +788,8 @@ public class TestDistributedQueue extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(queue);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(queue);
+            CloseableUtils.closeQuietly(client);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestQueueSharder.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestQueueSharder.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestQueueSharder.java
index 75184ff..78c833e 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestQueueSharder.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestQueueSharder.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.queue;
 
 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.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.BaseClassForTests;
@@ -90,8 +90,8 @@ public class TestQueueSharder extends BaseClassForTests
         finally
         {
             timing.sleepABit(); // let queue clear
-            Closeables.closeQuietly(sharder);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(sharder);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -126,9 +126,9 @@ public class TestQueueSharder extends BaseClassForTests
         finally
         {
             timing.sleepABit(); // let queues clear
-            Closeables.closeQuietly(sharder1);
-            Closeables.closeQuietly(sharder2);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(sharder1);
+            CloseableUtils.closeQuietly(sharder2);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -183,8 +183,8 @@ public class TestQueueSharder extends BaseClassForTests
         }
         finally
         {
-            Closeables.closeQuietly(sharder);
-            Closeables.closeQuietly(client);
+            CloseableUtils.closeQuietly(sharder);
+            CloseableUtils.closeQuietly(client);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestSimpleDistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestSimpleDistributedQueue.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestSimpleDistributedQueue.java
index 7ba5b42..6d27340 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestSimpleDistributedQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestSimpleDistributedQueue.java
@@ -18,7 +18,7 @@
  */
 package org.apache.curator.framework.recipes.queue;
 
-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;
@@ -413,7 +413,7 @@ public class TestSimpleDistributedQueue extends BaseClassForTests
         {
             for ( CuratorFramework c : clients )
             {
-                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/shared/TestSharedCount.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
index ed61d4b..4ad8318 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
@@ -19,7 +19,7 @@
 package org.apache.curator.framework.recipes.shared;
 
 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;
@@ -138,7 +138,7 @@ public class TestSharedCount extends BaseClassForTests
         {
             for ( CuratorFramework client : clients )
             {
-                Closeables.closeQuietly(client);
+                CloseableUtils.closeQuietly(client);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
index a3185f0..0269d24 100644
--- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
+++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
@@ -22,7 +22,7 @@ import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 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.listen.ListenerContainer;
 import org.apache.curator.framework.recipes.cache.ChildData;
@@ -104,7 +104,7 @@ public class ServiceCacheImpl<T> implements ServiceCache<T>,
PathChildrenCacheLi
             );
         listenerContainer.clear();
 
-        Closeables.closeQuietly(cache);
+        CloseableUtils.closeQuietly(cache);
 
         discovery.cacheClosed(this);
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
index 0627907..9fc2b54 100644
--- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
+++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
@@ -24,7 +24,7 @@ import com.google.common.collect.ImmutableList;
 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.state.ConnectionState;
 import org.apache.curator.framework.state.ConnectionStateListener;
@@ -115,11 +115,11 @@ public class ServiceDiscoveryImpl<T> implements ServiceDiscovery<T>
     {
         for ( ServiceCache<T> cache : Lists.newArrayList(caches) )
         {
-            Closeables.closeQuietly(cache);
+            CloseableUtils.closeQuietly(cache);
         }
         for ( ServiceProvider<T> provider : Lists.newArrayList(providers) )
         {
-            Closeables.closeQuietly(provider);
+            CloseableUtils.closeQuietly(provider);
         }
 
         for ( ServiceInstance<T> service : services.values() )

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceCache.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceCache.java
b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceCache.java
index 220e54e..3f4346b 100644
--- a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceCache.java
+++ b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceCache.java
@@ -19,7 +19,7 @@
 package org.apache.curator.x.discovery;
 
 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.state.ConnectionState;
@@ -93,7 +93,7 @@ public class TestServiceCache
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -136,7 +136,7 @@ public class TestServiceCache
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -190,7 +190,7 @@ public class TestServiceCache
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -248,7 +248,7 @@ public class TestServiceCache
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/863eaee2/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
index 1d9d895..b615c74 100644
--- a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
+++ b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
@@ -20,7 +20,7 @@ package org.apache.curator.x.discovery;
 
 import com.google.common.collect.Lists;
 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.CuratorFrameworkFactory;
 import org.apache.curator.retry.RetryOneTime;
@@ -94,7 +94,7 @@ public class TestServiceDiscovery
         {
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -142,7 +142,7 @@ public class TestServiceDiscovery
         {
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -178,7 +178,7 @@ public class TestServiceDiscovery
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -236,7 +236,7 @@ public class TestServiceDiscovery
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }
@@ -269,7 +269,7 @@ public class TestServiceDiscovery
             Collections.reverse(closeables);
             for ( Closeable c : closeables )
             {
-                Closeables.closeQuietly(c);
+                CloseableUtils.closeQuietly(c);
             }
         }
     }


Mime
View raw message