private CompletableFuture<?> runAsync(ExceptionalRunnable task, ExecutorService executor) {
    CompletableFuture<?> future = new CompletableFuture<>();
    executor.execute(() -> {
      try {
        task.run();
        future.complete(null);
      } catch (Exception e) {
        future.completeExceptionally(e);
      }
    });
    return future;
  }
For replication peer cluster key or endpoint class, null and empty string is same. So here
don't use {@link StringUtils#equals(CharSequence, CharSequence)} directly.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java