You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ch...@apache.org on 2017/07/05 01:55:15 UTC

hbase git commit: HBASE-18314 Eliminate the findbugs warnings for hbase-examples

Repository: hbase
Updated Branches:
  refs/heads/master e71e5ece8 -> 8b63eb6fc


HBASE-18314 Eliminate the findbugs warnings for hbase-examples


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

Branch: refs/heads/master
Commit: 8b63eb6fc6bd19efbdc974b7881dfde2c6ef57c8
Parents: e71e5ec
Author: Chia-Ping Tsai <ch...@gmail.com>
Authored: Wed Jul 5 09:54:40 2017 +0800
Committer: Chia-Ping Tsai <ch...@gmail.com>
Committed: Wed Jul 5 09:54:40 2017 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/client/example/AsyncClientExample.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8b63eb6f/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/AsyncClientExample.java
----------------------------------------------------------------------
diff --git a/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/AsyncClientExample.java b/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/AsyncClientExample.java
index 2d587bf..2105547 100644
--- a/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/AsyncClientExample.java
+++ b/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/AsyncClientExample.java
@@ -97,6 +97,8 @@ public class AsyncClientExample extends Configured implements Tool {
     }
   }
 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_NONNULL_PARAM_VIOLATION",
+      justification="it is valid to pass NULL to CompletableFuture#completedFuture")
   private CompletableFuture<Void> closeConn() {
     CompletableFuture<AsyncConnection> f = future.get();
     if (f == null) {
@@ -150,7 +152,7 @@ public class AsyncClientExample extends Configured implements Tool {
               LOG.info("put for " + i + " succeeded, try getting");
               table.get(new Get(getKey(i))).whenComplete((result, getErr) -> {
                 if (getErr != null) {
-                  LOG.warn("get failed for " + i, putErr);
+                  LOG.warn("get failed for " + i);
                   latch.countDown();
                   return;
                 }