From 29ec7493639cc0820641dc15902646876eed4bbb Mon Sep 17 00:00:00 2001 From: Chia-Ping Tsai Date: Wed, 5 Jul 2017 09:55:37 +0800 Subject: [PATCH] HBASE-18314 Eliminate the findbugs warnings for hbase-examples --- .../hadoop/hbase/client/example/AsyncClientExample.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 2d587bfe374..21055472127 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 closeConn() { CompletableFuture 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; }