HBASE-18314 Eliminate the findbugs warnings for hbase-examples
This commit is contained in:
parent
e71e5ece88
commit
8b63eb6fc6
|
@ -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() {
|
private CompletableFuture<Void> closeConn() {
|
||||||
CompletableFuture<AsyncConnection> f = future.get();
|
CompletableFuture<AsyncConnection> f = future.get();
|
||||||
if (f == null) {
|
if (f == null) {
|
||||||
|
@ -150,7 +152,7 @@ public class AsyncClientExample extends Configured implements Tool {
|
||||||
LOG.info("put for " + i + " succeeded, try getting");
|
LOG.info("put for " + i + " succeeded, try getting");
|
||||||
table.get(new Get(getKey(i))).whenComplete((result, getErr) -> {
|
table.get(new Get(getKey(i))).whenComplete((result, getErr) -> {
|
||||||
if (getErr != null) {
|
if (getErr != null) {
|
||||||
LOG.warn("get failed for " + i, putErr);
|
LOG.warn("get failed for " + i);
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue