curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cammcken...@apache.org
Subject git commit: CURATOR-127 Fix trivial warnings
Date Fri, 25 Jul 2014 22:57:49 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-127 [created] 15a0aacec


CURATOR-127 Fix trivial warnings

Remove wildcard imports. Add generic types to Class.
Add serialVersionUID to Serializable.


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

Branch: refs/heads/CURATOR-127
Commit: 15a0aaceca48da49898dc25a9c7cc6521708e8ff
Parents: 27a0dc8
Author: Mike Drob <mdrob@cloudera.com>
Authored: Fri Jul 25 13:23:10 2014 -0500
Committer: Mike Drob <mdrob@cloudera.com>
Committed: Fri Jul 25 13:23:47 2014 -0500

----------------------------------------------------------------------
 .../curator/CuratorConnectionLossException.java |  1 +
 .../apache/curator/SessionFailRetryLoop.java    |  1 +
 .../java/org/apache/curator/TestEnsurePath.java | 24 ++++++++++++--------
 .../org/apache/curator/test/ServerHelper.java   | 12 +++++-----
 4 files changed, 22 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/15a0aace/curator-client/src/main/java/org/apache/curator/CuratorConnectionLossException.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/CuratorConnectionLossException.java
b/curator-client/src/main/java/org/apache/curator/CuratorConnectionLossException.java
index df9da56..811140f 100644
--- a/curator-client/src/main/java/org/apache/curator/CuratorConnectionLossException.java
+++ b/curator-client/src/main/java/org/apache/curator/CuratorConnectionLossException.java
@@ -26,4 +26,5 @@ import org.apache.zookeeper.KeeperException;
  */
 public class CuratorConnectionLossException extends KeeperException.ConnectionLossException
 {
+  private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/15a0aace/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java b/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
index ec77b35..8647952 100644
--- a/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
+++ b/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
@@ -116,6 +116,7 @@ public class SessionFailRetryLoop implements Closeable
 
     public static class SessionFailedException extends Exception
     {
+      private static final long serialVersionUID = 1L;
     }
 
     public enum Mode

http://git-wip-us.apache.org/repos/asf/curator/blob/15a0aace/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java
----------------------------------------------------------------------
diff --git a/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java b/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java
index 4378564..4fe9561 100644
--- a/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java
+++ b/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java
@@ -18,6 +18,20 @@
  */
 package org.apache.curator;
 
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.when;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.utils.EnsurePath;
 import org.apache.zookeeper.ZooKeeper;
@@ -27,16 +41,6 @@ import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 import org.testng.Assert;
 import org.testng.annotations.Test;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Mockito.*;
-import static org.mockito.Mockito.mock;
 
 public class TestEnsurePath
 {

http://git-wip-us.apache.org/repos/asf/curator/blob/15a0aace/curator-test/src/main/java/org/apache/curator/test/ServerHelper.java
----------------------------------------------------------------------
diff --git a/curator-test/src/main/java/org/apache/curator/test/ServerHelper.java b/curator-test/src/main/java/org/apache/curator/test/ServerHelper.java
index b0ed2a7..5a9dff4 100644
--- a/curator-test/src/main/java/org/apache/curator/test/ServerHelper.java
+++ b/curator-test/src/main/java/org/apache/curator/test/ServerHelper.java
@@ -27,12 +27,12 @@ class ServerHelper
 {
     private static class ServerCnxnFactoryMethods
     {
-        private final Constructor constructor;
+        private final Constructor<?> constructor;
         private final Method configureMethod;
         private final Method startupMethod;
         private final Method shutdownMethod;
 
-        private ServerCnxnFactoryMethods(Constructor constructor, Method configureMethod,
Method startupMethod, Method shutdownMethod)
+        private ServerCnxnFactoryMethods(Constructor<?> constructor, Method configureMethod,
Method startupMethod, Method shutdownMethod)
         {
             this.constructor = constructor;
             this.configureMethod = configureMethod;
@@ -43,11 +43,11 @@ class ServerHelper
 
     private static class NioServerCnxnMethods
     {
-        private final Constructor constructor;
+        private final Constructor<?> constructor;
         private final Method startupMethod;
         private final Method shutdownMethod;
 
-        private NioServerCnxnMethods(Constructor constructor, Method startupMethod, Method
shutdownMethod)
+        private NioServerCnxnMethods(Constructor<?> constructor, Method startupMethod,
Method shutdownMethod)
         {
             this.constructor = constructor;
             this.startupMethod = startupMethod;
@@ -60,8 +60,8 @@ class ServerHelper
 
     static
     {
-        Class       serverCnxnFactoryClass = null;
-        Class       nioServerCnxnFactoryClass = null;
+        Class<?>       serverCnxnFactoryClass = null;
+        Class<?>       nioServerCnxnFactoryClass = null;
         try
         {
             serverCnxnFactoryClass = Class.forName("org.apache.zookeeper.server.NIOServerCnxnFactory");


Mime
View raw message