Make sure the '&&' is on a single line for readability.
Change-Id: I7c1f07e2c967c3c1bff1826afdde94a59a0c7cb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
// the log with the later term is more up-to-date. If the logs
// end with the same term, then whichever log is longer is
// more up-to-date.
// the log with the later term is more up-to-date. If the logs
// end with the same term, then whichever log is longer is
// more up-to-date.
- if (requestVote.getLastLogTerm() > lastTerm() || requestVote.getLastLogTerm() == lastTerm()
- && requestVote.getLastLogIndex() >= lastIndex()) {
+ if (requestVote.getLastLogTerm() > lastTerm()
+ || requestVote.getLastLogTerm() == lastTerm() && requestVote.getLastLogIndex() >= lastIndex()) {
candidateLatest = true;
}
candidateLatest = true;
}