Skip to content

Commit

Permalink
[hotfix] Remove redundant variable
Browse files Browse the repository at this point in the history
  • Loading branch information
GJL authored and tillrohrmann committed Jan 26, 2018
1 parent 66f6134 commit d33aed3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ public LeaderRetriever() {
public Optional<Tuple2<String, UUID>> getLeaderNow() throws Exception {
CompletableFuture<Tuple2<String, UUID>> leaderFuture = this.atomicLeaderFuture.get();
if (leaderFuture != null) {
CompletableFuture<Tuple2<String, UUID>> currentLeaderFuture = leaderFuture;

if (currentLeaderFuture.isDone()) {
return Optional.of(currentLeaderFuture.get());
if (leaderFuture.isDone()) {
return Optional.of(leaderFuture.get());
} else {
return Optional.empty();
}
Expand Down

0 comments on commit d33aed3

Please sign in to comment.