HBASE-18314 Eliminate the findbugs warnings for hbase-examples

This commit is contained in:
Chia-Ping Tsai 2017-07-05 09:55:37 +08:00
parent 590979aac3
commit 29ec749363
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}