accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhava...@apache.org
Subject [11/11] git commit: ACCUMULO-2524 Update ProblemReport to use Preconditions over ArgumentChecker
Date Thu, 27 Mar 2014 21:35:53 GMT
ACCUMULO-2524 Update ProblemReport to use Preconditions over ArgumentChecker


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

Branch: refs/heads/master
Commit: 4cfde769c0d1d12de40993c3b25776a64bcf00a8
Parents: 367a4d0
Author: Bill Havanki <bhavanki@cloudera.com>
Authored: Thu Mar 27 17:35:07 2014 -0400
Committer: Bill Havanki <bhavanki@cloudera.com>
Committed: Thu Mar 27 17:35:07 2014 -0400

----------------------------------------------------------------------
 .../apache/accumulo/server/problems/ProblemReport.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4cfde769/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
index decc995..d0aef3d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.server.problems;
 
+import static com.google.common.base.Preconditions.checkNotNull;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
@@ -29,7 +30,6 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.Encoding;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
@@ -49,7 +49,9 @@ public class ProblemReport {
   private long creationTime;
   
   public ProblemReport(String table, ProblemType problemType, String resource, String server,
Throwable e) {
-    ArgumentChecker.notNull(table, problemType, resource);
+    checkNotNull(table, "table is null");
+    checkNotNull(problemType, "problemType is null");
+    checkNotNull(resource, "resource is null");
     this.tableName = table;
     
     this.problemType = problemType;
@@ -76,7 +78,9 @@ public class ProblemReport {
   }
   
   private ProblemReport(String table, ProblemType problemType, String resource, byte enc[])
throws IOException {
-    ArgumentChecker.notNull(table, problemType, resource);
+    checkNotNull(table, "table is null");
+    checkNotNull(problemType, "problemType is null");
+    checkNotNull(resource, "resource is null");
     this.tableName = table;
     this.problemType = problemType;
     this.resource = resource;


Mime
View raw message